Design HashMap at TikTok
Easy66.4% acceptance
This problem has 62.5% frequency at TikTok.
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 hintsTopics
Also asked at 14 companies
More TikTok Questions
LRU CacheMediumNumber of IslandsMediumLongest Substring Without Repeating CharactersMediumTrapping Rain WaterHardMerge IntervalsMedium
View all TikTok questions