# CS 302 - Data Structures

## Fall 2016

## Programming Assignment 7: Red-Black Tree

## Due on Tuesday, Dec 13 at 4 pm

~~Programming Problem 3 on Page 628~~. Remember that Chapter 19 slides provide details of how to implement red-black tree.

- Randomly generate 1,000 unique values in the range of [1-10,000] and insert them into a red black tree. Print height of the tree.
- Print sum of all values in the tree (should use one of the traversals).
- Clear the binary search trees. Print whether trees are empty before and after clear operation.

Note: You can omit any operation that is not required for the above steps.

Deliverables:

- Source code for your classes
- Doxygen reports for code documentation
- A main file that tests the classes with above steps.
- Test output of your codes.

Teaching Assistant:Iman Vakili

What to turn in:
A softcopy of your sourcecode and reports should be **uploaded to WebCampus**. Compress all files as a single zip file.