Given a node in a BST, how does one find the next higher key?
we dont need parent link or stack to find the in order successor in O(log n) (assuming balanced tree). Keep a temporary variable with the most recent value encountered in the inorder traversal that is larger than the key. if inorder traversal finds that the node does not have a right child, then this would be the inorder successor. else, the leftmost descendant of the right child.