The readings for Monday, October 3 are:
Data Structures and Other Objects Using C++:
The focus of the reading is Red-Black Trees and Treaps.
Once you have completed the readings, answer the following questions in the
reading06/README.md
file in your assignments repository:
Red-Black Trees utilize rotation operations to keep the trees balanced. Explain what happens during a left rotation.
The nodes in Red-Black Trees are colored red and black. What three invariants must Red-Black trees maintain in regards to these markings.
Explain how Treaps are both binary search trees and binary heaps by describing what happens when a value gets inserted into the data structure.
For both Red-Black Trees and Treaps, identify the average and worst case time complexities in terms of Big O for the following set operations:
Search
Insert
Remove
If the average and worst case time complexities are different, then explain the reason for the difference.
To submit your solution, you must initiate a Merge Request in your private assignments repository and assign it to the appropriate TA from the Reading 06 - TA assignment list.
To facility the Merge Request workflow, you must do your development in its own branch:
$ cd path/to/repo # Go to your repository $ git checkout master # Make sure we are on master branch first $ git pull # Make sure we have changes from GitLab $ git checkout -b reading06 # Create reading06 branch ... # Do your work $ git commit # Commit your work (can do this multiple times) $ git push -u origin reading06 # Push branch to GitLab