Exercise 12.3-6

When node \(z\) in TREE-DELETE has two children, we could choose node \(y\) as its predecessor rather than its successor. What other changes to TREE-DELETE would be necessary if we do? Some have argued that a fair strategy, giving equal priority to predecessor and successor, yeilds better empirical performance. How might TREE-DELETE be changed to implement such a fair strategy?

We would only need to change line 5:

else y = TREE-MAXIMUM(z.left)

A fair strategy would be to flip a coin (arbitrary select either option with equal probability).