...

/

Exercise: Scapegoat Trees

Exercise: Scapegoat Trees

Solve a task that modifies the add() method for ScapegoatTree.

We'll cover the following...

Task

Modify the add(x) method for ScapegoatTree so that it does not waste any time recomputing the sizes of subtrees that have already been computed. This is possible because, by ...