| Topic | Difficulty | Companies |
|---|---|---|
| Binary Search Tree | MEDIUM | Facebook Microsoft Amazon |
Given a Binary Search Tree with parent pointers, write a program to find the in-order successor node of any given node k in that tree.
Problem Note
For Example
Input: Given BST is below
18
/ \
8 22
/ \
4 12
/ \
11 14
k = 14
Output: 18
Explanation: In-order successor of 14 is 18.