285. Inorder Successor in BST
Input:
root = [2,1,3], p = 1
2
/ \
1 3
Output: 2Input:
root = [5,3,6,2,4,null,null,1], p = 6
5
/ \
3 6
/ \
2 4
/
1
Output:nullPrevious109. Convert Sorted List to Binary Search TreeNextConvert Binary Search Tree (BST) to Sorted Doubly-Linked List
Last updated
Was this helpful?