Is ONLY COMPLETE binary trees allowed?


#1

Is the expected output key accepting only complete binary tree inputs or any kind of bst?
eg how to give input tree like below
5
/
3 9
/ /
1 7 10
\ /
2 6 8