Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
gtpWebDev opened this issue Mar 25, 2024 · 2 comments
Open
2 of 3 tasks
Labels
Status: Stale This issue/PR has been inactive for over 30 days and will be closed if inactivity continues

Comments

@gtpWebDev
Copy link

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!

@JoshDevHub
Copy link
Contributor

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.

Copy link

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

@github-actions github-actions bot added the Status: Stale This issue/PR has been inactive for over 30 days and will be closed if inactivity continues label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale This issue/PR has been inactive for over 30 days and will be closed if inactivity continues
Projects
None yet
Development

No branches or pull requests

2 participants