J.P. Morgan Interview Question

find next greater element in BST?