rebuild BST binary search tree from preorder