merge two balanced binary search tree gfg
Input:
BST1:
5
/ \
3 6
/ \
2 4
BST2:
2
/ \
1 3
\
7
/
6
Output: 1 2 2 3 3 4 5 6 6 7
Explanation:
After merging and sorting the
two BST we get 1 2 2 3 3 4 5 6 6 7.