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
Completing this assignment is worth 98 points and your submission will be graded as follows:
- 7 points: Planning (completeness, not correctness)
- 13 points: Repository Status (Makefile, code compiles, correct files submitted, no cpplint errors)
- 20 points: Coding Style
- 23 points: Writing Tests
- 28 points: Implementation Correctness
- 7 points: Written Responses
(When logged in, completion status appears here.)