Skip to content

Constructor can start selecting the bucketlist size at 2 instead of 1 #3

@Illation

Description

@Illation

Assuming someone constructed a hash map with a capcity of 0 or 1 elements, and proceeded to add an element, the map would immediately rehash. Since we do not start with a completely empty bucket list anyway, we may as well start at 2. This would also save an iteration of the while loop.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions