Hey!
I am not getting the correct output for preorder in this case please tell what is wrong??
Print BST key in given range
your condition is wrong
suppose root->data=3 and range is 1-5
if(k2 > root->data){
so this condition is true hence you go to right part only but ans also exits in left
simillarly for left
i hope you understand
now try again and also keep in mind the sample output
if you have more doubts feel free to ask