You hold one node of a binary search tree — no root — and every node knows its parent. Find the next and the previous value in sorted order.
You hold one node of a binary search tree — no root — and every node knows its parent. Find the next and the previous value in sorted order.
Opens with the full question.