October 2025
Intermediate to advanced
485 pages
13h 2m
English
These are the solutions to the Exercises.
The tree will look like this:

This is because we always switch the orientation of the parent-child relationship. Since previously, the A was the B’s left child, the B will now become the A’s right child.
The red-black tree will look like this after the rotation:

When we rotate the 80 and 100, the orientation flips, so the 100 becomes the right child of the 80. However, this creates a problem of where to place the 85. Given that the 85 was the 80’s right child, where does the 85 go now that the ...
Read now
Unlock full access