Multiple number of ans. for a single test case

In the given test case more than one binary tree is possible.
So there will be different pre-order traversal for the same tree. So which one to take?
like [4,2,3,5,6] is also a bst from the given array.

and should the node in the range should be printed in non-decreasing order?

hi @Yababyitsme you have to make a BST not a regular binary tree

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.