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

Javascript: Project HashMap - wrong examples #29210

Open
3 tasks done
Punith1117 opened this issue Dec 19, 2024 · 3 comments
Open
3 tasks done

Javascript: Project HashMap - wrong examples #29210

Punith1117 opened this issue Dec 19, 2024 · 3 comments
Assignees

Comments

@Punith1117
Copy link

Checks

Describe your suggestion

'Carlos' and 'Carla' don't get hashed to 3. 'Carlos' gets hashed to 9 and 'Carla' gets hashed to 12 when the results of the hash function(64878633 & 2011238172) modulo 16.
odinProjectError

Path

Node / JS

Lesson Url

https://www.theodinproject.com/lessons/javascript-hashmap

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

@Punith1117 Punith1117 changed the title Javascript: Project HashMap Javascript: Project HashMap - wrong examples Dec 19, 2024
@CouchofTomato
Copy link
Member

@JoshDevHub Would you mind taking a look at this please?

@JoshDevHub
Copy link
Contributor

Thank you for making this issue @Punith1117 You're absolutely correct about this. I think you can fix it by finding two strings that do yield the same index under the given hashing algorithm.

Since you indicated you'd like to work on this issue, I'll assign you. This same issue exists in the Ruby version of this lesson. It'd be great if you could make the same changes there. Don't worry, you shouldn't have to know any Ruby to be able to do this. Let me know if you have any questions!

@Punith1117
Copy link
Author

@JoshDevHub Thank you for assigning me this issue. Will work on it and create a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants