Creating our own hashmap in java

coding algorithms

This is an attempt to come up with my own hashmap in java. It serves all basic needs of original java.util.HashMap with O(1) complexity in read operations.

To look into the internals of java.util.HashMap itself, see here

Output is ‘SMTS1’ which says when key is duplicated, it is getting replaced.

To cross verify the concept like collisions we need to choose the user defined key instead of ‘String’, I hope one can take it further from here on 🙂

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s