construct BST from pre order traversal