Homework 7
This week you will practice the following:
- Converting a class to a class template.
- Adapting an implementation to a change in encoding.
- Implementing a self-balancing binary search tree.
- Testing the correctness of your data structure.
Getting Started
This assignment is paired, and your repository belongs to your pair. Your pairing for Homeworks 7 and 8 came from the Homeworks 7–8 pairing board, and the repository is named after your group—there is nothing to accept and no team to create.
- Your group is
group (members ) - Your repository for Homework 7 is
repo - You can see it on the web at https://github.com/hmc-cs70-fall2026/
Both of you have push access to that one repository, so you are working in the same place rather than each having a copy to reconcile later.
The link says the page doesn't exist!
That usually means you are not in the CS 70 GitHub organization yet, rather than that your repository is missing. GitHub hides what you cannot see rather than admitting it is there.
So "not found" and "not allowed" look the same on purpose.
Exactly—so that nobody can go fishing for the names of private repositories. On the server,
cs70-fix-accesswill check your membership and sort most of this out for you.
Clone your repository on the CS 70 server to get started:
git clone https://github.com/hmc-cs70-fall2026/repo .git
Steps
For these first two parts, the code is pretty much following the Homework 6 specification for tree functionality.
At this point, we'll begin enhancing our TreeSet class template, so you will want to read through the specifications below, but remember, you don't need to start implementing them yet! We'll guide you through the enhancements step-by-step.
As in other assignments, we encourage you to keep the specification document open in a separate window or tab for reference.
- Phase 3: Lower Bound
- Phase 4: Specifying the Insertion Scheme
- Phase 5: Insert and Move to Root
- Phase 6: Move
size_toNode - Phase 7: Randomized Insert
- Phase 8: Written Questions: Using Your Search Tree
- Phase 9: More Fun with Search Trees (Optional)
- Check Your Submission
Ask for (and give each other) help!
Post your questions there, and be sure to answer each other's.
Resources
Please refer (frequently!) to these specifications for the data structure you will be implementing:
You may also want to review Section 16.1 of the
and, from our help section,
Grading
Completing this assignment is worth 98 points and your submission will be graded as follows:
- 3 points: Planning (Completeness, not Correctness)
- 14 points: Repository Status (Code compiles, Correct files submitted, no
cpplinterrors) - 20 points: Coding Style
- 26 points: Writing Tests
- 35 points: Implementation Correctness
(When logged in, completion status appears here.)