sir why my test case is failing output is correct
Print BST keys in the given range
Sample Input
1 5 4 3 2 5 6 3 5
Sample Output
. # Preorder : 4 3 2 5 6
. # Nodes within range are : 3 4 5
Your Output:
. # Preorder : 4 2 3 5 6
. # Nodes within range are : 3 4 5
sir toh kya array sort karke bianry tree nahi bannaa hai
- 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. - 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.