Construct Binary Search Tree from Preorder Traversal
Each preorder value is placed inside the bounds left by its ancestors, so one pass with an index builds the whole tree.
Each preorder value is placed inside the bounds left by its ancestors, so one pass with an index builds the whole tree.