BST keys in given range.Not able to submit

This code gives correct o/p but it doesn’t satisfy testcase1