Practice: Left-Leaning Red-Black Trees

This is a practice problem, but it fits into the sequence of balanced tree projects and uses the same code base.

Recall that the description of the AVL tree project contains information about the series of projects that includes this one and the next, as well as the set-up and the code base.

1. Introduction

The goal of this project is to understand the implement the rotations that maintain the properties of left-leaning red-black trees. It appears in the book as Project 5.4 on page 420.

2. Left-leaning red-black trees

As described in part a, finish the method LLRBBalancer.putFixup(). Test using test.LLRBBSTMTest.

Part b is about removal, which we're not covering.

Turn in LLRBBalancer.java to /cslab/class/cs345/(your id)/llrb for extra credit.


Thomas VanDrunen
Last modified: Mon Mar 16 16:06:56 CDT 2020