DEV Community

rmahawewa
rmahawewa

Posted on

Few bytes of Hash Map Cake

Special Thanks to
lucid.app
a cup cake

  • Hash map is a clear data structure to store daily challenges properly. This data structure has a key - value pair where we can map the value according to the key. One best way to avoid collisions is adding a linked list to each bucket

-when the bucket is getting full we can divide the bucket(hash code) by a number and add this inside the linked list.

-There are two factors to be considered when we want to grow our bucket size. They are called Capacity and Load Factor

  1. Capacity
    The total number of buckets

  2. Load Factor
    This factor is to determine if it is a time to grow the bucket amount.

To be continued :)

Top comments (0)