Print BST keys in the given range

why i am getting wrong answer

There was an error in your build function. It was not taking all the nodes.
I’ve made some changes in your code, check it out