reconstruct BST from preorder array