Binary Search Tree

1. If a node has 2 children, how can we delete the value in that node:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. If a node has 1 child to the right, but not left child, how can we delete it:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. In a real BST, delete takes O(log n) time. Assume that you discover an oracle which can search, compute min or max of a subtree, in a binary search tree in O(1) time. What will the time complexity of the optimal deletion algorithm using this oracle:
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation