it works fine for sample input but is failing test cases
code :- https://ide.codingblocks.com/s/176455
Code is failing test
Hey @itsmeshubhamkumar there are couple of problems in your code
- your are not printing endl at the end of each test case
- you are printing k1 and k2 even when they are not present in the tree
- you are not printing the nodes within range in sorted order.
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.