Skip to content

Commit b035c25

Browse files
committed
add question
1 parent 3dff12a commit b035c25

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Trees/Binary Search Trees/reconstruct_bst.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
/*
2+
Reconstruct BST
3+
The pre-order traversal of a Binary Tree is a traversal technique that starts at the tree's root node and visits nodes in the following order:
4+
Current Node
5+
Left Subtree
6+
Right Subtree
7+
8+
Given a non-empty array of integers representing the pre-order traversal of a Binary Search Tree (BST),
9+
write a function that creates the relevant BST and returns its root node.
10+
11+
The input array will contain the values of BST nodes in the order in which these nodes would be visited with a pre-order traversal.
12+
213
Explanation:
314
415
Approach 1:

0 commit comments

Comments
 (0)