We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dff12a commit b035c25Copy full SHA for b035c25
Trees/Binary Search Trees/reconstruct_bst.go
@@ -1,4 +1,15 @@
1
/*
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
13
Explanation:
14
15
Approach 1:
0 commit comments