HashMap Data Structure: more clarity over need to rehash existing keys when growing a hash map
Checks
- [X] This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- [X] I have thoroughly read and understand The Odin Project Contributing Guide
- [ ] Would you like to work on this issue?
Describe your suggestion
As I understand it, when growing a hash map, it is necessary to rehash all existing keys. The course currently says "To grow our buckets, we create a new buckets list that is double the size of the old buckets list, then we copy all nodes over to the new buckets." That wasn't very clear to me, and skimming solutions from students on the hashmap project, 2 out of 3 just mapped the existing keys directly to the larger hash map without rehashing them. It would certainly benefit from more explanation.
Path
Node / JS
Lesson Url
https://www.theodinproject.com/lessons/javascript-hashmap-data-structure
(Optional) Discord Name
glenoftzintel
(Optional) Additional Comments
Enjoying the course, intending to start to provide a bit more feedback going forward!
I agree this is a good idea, and thank you for making this issue.
Might be something we handle as part of #27174, but I'll keep this open in case we don't.
This issue is stale because it has had no activity for the last 30 days.