What is wrong in my code

As we only need to print the keys in range
So there is no need for making tree right ?
it can be done from preorder