next greater number for the given number in binary tree