Skip to content

feat: implement custom hash map#1704

Open
RodionPlakhotniuk wants to merge 1 commit into
mate-academy:masterfrom
RodionPlakhotniuk:feature/jv-hash-map
Open

feat: implement custom hash map#1704
RodionPlakhotniuk wants to merge 1 commit into
mate-academy:masterfrom
RodionPlakhotniuk:feature/jv-hash-map

Conversation

@RodionPlakhotniuk

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Your implementation fully satisfies all HashMap requirements. The core functionality is correctly implemented: the put method properly handles collisions through chaining and updates existing keys, getValue returns the correct value or null, and getSize accurately tracks the entry count. All required features are present including the initial capacity of 16, load factor of 0.75, and automatic resizing. The code follows best practices with magic numbers extracted as constants (DEFAULT_CAPACITY, LOAD_FACTOR, RESIZE_MULTIPLIER), proper use of generics on the Node class, and appropriate access modifiers with private utility methods after public API. The implementation is clean, well-structured, and meets all checklist criteria.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

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

Successfully merging this pull request may close these issues.

2 participants