Print BST keys in the given range


Pls tell why my code is faling the test case, I even checked it for a self made case

9 15 11 12 13 9 10 7 16 17 7 13, it is giving the correct answer 7, 9, 11, 12, 13. I hope that I didnt msunderstand the question

I have edited your code… Try to submit it now…

The edited code is passing the test case, I misunderstood the question I guess, in the scenario where the BST in level order is 15, 11,17, 10,12,16,18. If I find between 10 and 12, wont it be 10, 11, 12