What is wrong with code?

The question so unclear , i cant understand what is wrong with my solution

Hello @anushreemahur5,

  1. In this question, you have given a sequence of numbers and you have to build a BST from it.
    Then you have to print the preorder traversal of the BST you have created.

  2. You are given two number a & b and you have to print all the numbers present in the BST (say x) and lies in the range [a,b] i.e. a<=x<=b.

Examples:

  1. 4 3 2 5 6
    3 5
    Output: 3 4 5

  2. 4 3 2 5 6
    1 7
    Output: 2 3 4 5 6

  3. 7 3 2 5 6
    2 5
    Output: 2 3 5

Hope, this would help.
Give a like if you are satisfied.

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.