Given a node in a BST, how does one find the next higher key?
The general way depends on whether you have a parent link in your nodes or not.
Then you pick:
If you have right child, do this approach (case 1 above):
If you don't have a right child, do this approach (case 2 above):
Then you need to run a complete scan of the tree, keeping track of the nodes, usually with a stack, so that you have the information necessary to basically do the same as the first method that relied on the parent link.