how to solve is this a binary search tree