コード例 #1
0
  public static void main(String[] args) {

    int[] nums = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    BinarySearchTreeNode rootNode = construct(nums, 0, nums.length - 1);

    InOrderPrint.display(rootNode);
  }
コード例 #2
0
  public static void main(String[] args) {

    BinarySearchTreeNode rootNode = BinarySearchTree.createBinarySearchTree();
    int k1 = 50;
    int k2 = 145;
    checkNode(rootNode, k1, k2);

    // In order print
    InOrderPrint.display(rootNode);
  }