Design HashMap at Tripactions

Easy66.4% acceptance

This problem has 100.0% frequency at Tripactions.

Problem Description

Design a HashMap without using any built-in hash table libraries. Implement the `MyHashMap` class: * `MyHashMap()` initializes the object with an empty map. * `void put(int key, int value)` inserts a `(key, value)` pair into the HashMap. If the `key` already exists in the map, update the corre...

Read full problem and hints

Topics

Also asked at 14 companies