Skip to content

JS: HashMap exercise needs explicit suggestion to use 16 buckets at start #29162

@hbar1st

Description

@hbar1st

Checks

Describe your suggestion

The HashMap exercise does not explicitly state that the initial buckets used should be 16 but the test setup uses 12 pieces of data which happens to be exactly .75 x 16. In order to reconcile the test steps with the earlier instructions, the earlier instructions need to explicitly state "The initial value for capacity should be 16." it can state that right after this part:

Start by creating a HashMap class or factory function. It’s up to you which you want to use. It should have at least two variables for load factor and capacity.

Once we have explicit directions to create an initial set of 16 buckets, the test instructions make sense (while as they stand now, they really really don't. For eg. If I had picked a capacity size of 19, then 12 pieces of data would definitely not have allowed me to reach a .75 load level)

thanks for your attention to the matter.

Path

Node / JS

Lesson Url

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

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions