Min Height BST
Min Height BST
Sample Input
array = [1, 2, 5, 7, 10, 13, 14, 15, 22]Sample Output
10
/ \
2 14
/ \ / \
1 5 13 15
\ \
7 22
// This is one example of a BST with min height
// that you could create from the input array.
// You could create other BSTs with min height
// from the same array; for example:
10
/ \
5 15
/ \ / \
2 7 13 22
/ \
1 14Last updated