Skip to content

Commit df20d2c

Browse files
committed
add sample io
1 parent b035c25 commit df20d2c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Trees/Binary Search Trees/reconstruct_bst.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
1111
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.
1212
13+
Sample Input: [10, 4, 2, 1, 5, 17, 19, 18]
14+
Sample Output:
15+
10
16+
/ \
17+
4 17
18+
/ \ \
19+
2 5 19
20+
/ /
21+
1 18
22+
1323
Explanation:
1424
1525
Approach 1:

0 commit comments

Comments
 (0)