curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

HashMap Data Structure: more clarity over need to rehash existing keys when growing a hash map

Open gtpWebDev opened this issue 1 year ago • 2 comments

Checks

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!

gtpWebDev avatar Mar 25 '24 13:03 gtpWebDev

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.

JoshDevHub avatar Mar 25 '24 17:03 JoshDevHub

This issue is stale because it has had no activity for the last 30 days.

github-actions[bot] avatar Apr 25 '24 01:04 github-actions[bot]