Homework 8: Pokemon or Tech Startup? Let's Hash it Out!
I have an announcement to make! I recently built an app for a hackathon, and this summer I'm going to turn it into a startup!
That's amazing news, Dog.
All I need is a catchy name to make it go viral. It's a math app, so I'm thinking..."Plusle".
...Hate to break it to ya, but "Plusle" is the name of a Pokemon.
Seriously???
You know, this reminds me of an image that went viral back when I was a young calf...
Well, I could look up a list of Pokemon to avoid picking one of those names. But I'd really rather not come up with a name that sounds like a Pokemon (what if Nintendo coincidentally takes it later)?
You know, I bet AI could help you with that.
Indeed it can. Here's Gemini:

Using Gemini for this feels like overkill. I wonder if we could make our own, smaller AI just for this task.
Funny you say that...
In this eighth and final homework, you'll explore how hash tables can be used to implement a simple machine learning algorithm that can classify a never-before-seen text as either "sounds more like a Pokemon" or "sounds more like software"! Specifically, you will implement your own hash table class to represent an associative data structure (like a Python dict). In doing this, you'll get to practice:
- Analyzing hash functions and choosing the best one for the task.
- Implementing a hash table using separate chaining.
Let's Go!
Both team members should click here to accept the assignment:
- Phase 1: Exploring the Interactive Demo
- Phase 2:
HashMultiset<T>Interface and Stubs - Phase 3: Evaluating Hash Functions
- Phase 4: Constructor, Destructor,
swap,size, andbuckets - Phase 5:
insert,count,contains, andprintToStream - Phase 6: Rehashing
- Phase 7:
HashMultiset<T>Performance Statistics - Phase 8: Use Your
HashMultiset<T>for Machine Learning - Phase 9: More Fun with Hash Tables (Optional)
- Written Questions
- Check Your Submission
Resources
As always, we encourage you to ask (and answer) questions on Piazza as you work!
Grading
Completing this assignment is worth 100 points, and will be graded as follows:
- 5 points: Planning (Completeness, not correctness)
- 13 points: Repository Status (Makefile, code compiles, correct files submitted, no
cpplinterrors) - 2 points: All Team Members Listed on Gradescope Submission
- 20 points: Coding Style
- 25 points: Writing Tests
- 30 points: Implementation Correctness
- 5 points: Hash-Function Choice Justification
(When logged in, completion status appears here.)
