Homework 6
In this week's assignment you will practice
- Implementing a binary-search tree.
- Implementing an iterator for a non-linear data structure.
- Testing the correctness of your data structure.
Getting Started
This assignment is paired, and your repository belongs to your pair. It is the same pair as Homeworks 4 and 5 (the pair2 pairing); there is nothing to accept and no name to agree on, and the repository is named after your group.
- Your group is
group (members ) - Your repository for Homework 6 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. Clone it on the CS 70 server to get started:
git clone https://github.com/hmc-cs70-fall2026/repo .git
The provided code includes two files minispell.cpp and Responses.md that you should ignore for now—we'll only use them at the very end.
Heads up — pick your next partner. Homeworks 7 and 8 are done with a new pair. Sign up on the pairing board for Homeworks 7–8 by the Homework 6 deadline, or we'll assign you a partner.
You will be developing the TreeStringset class according to the following specifications:
You should keep these open in another browser window or tab for reference.
Steps
- Stubs and Interface
- TreeStringSet Constructors
- Insert and Exists
- Displaying the Tree Structure
- An In-Order Iterator
- Tree (In)equality
- Tree Statistics
- Using Your Search Tree
- Written Questions
- Check Your Submission
Resources
Specifications for the data structure you will be implementing:
Useful Help pages
- Getting Help with Homework 6 — ask and answer questions here
- General Debugging Tips
- Working with Makefiles
- The CS 70 Testing Library
- Writing Good Tests
- Writing Idiomatic C++ Code
- CS 70 Naming Conventions
- Safe Numeric Conversions in C++
Textbook
You may also want to review Sections 7.1–7.5, Section 8.3, and Sections 9.1–9.3 of the C++ Primer, 5th Edition.
Piazza!
Grading
This assignment is graded in these parts:
- the written questions;
- your code: the autograder (it builds without warnings, passes
cpplint, has the right files, passes our tests, and your own tests catch our deliberately broken versions), and a code review of its clarity and style by the course staff; - and your planning images (for completeness, not correctness).
Each question shows its points beside it, on its own page, so there's only one place to look. Your grade for the assignment is the percentage of its points you earned, which is what the gradebook shows.
(When logged in, completion status appears here.)