Implement a Hash Map - For Coding Interviews

preview_player
Показать описание
Arrays are amazing for looking up elements at specific indices as all elements in memory are contiguous, allowing for O(1) or constant time lookups. But often we don't, or can't, perform lookups via indices. Hash maps and hash tables are a way around this, enabling us to lookup via keys instead.

Can you implement the Map class from scratch? Only two methods are necessary-- get and set. Many programming languages have a built-in hash or dictionary primitive (like Javascript Objects and {} notation), but we don't want to use that for this exercise.




Creative Commons Attribution 3.0 Unported License
Рекомендации по теме
Комментарии
Автор

Thanks for sharing, Jake. Looking forward to the next video!

fleonardo
Автор

Doesn't quite feel right to me...

mattiamarchese
visit shbcf.ru