Hash Map | Internal Working and Implementation of Hash Maps

preview_player
Показать описание
My coding profiles:

Hi Everyone!!

This video will introduce you to the basic theory behind how hashMaps are designed in standard template libraries of languages like C++ and Java.

In this video I will also be discussing various designs and implementing hashMap/Set from scratch in C++ using classes.

Here is gist of what's in the video:
1. Challenge: Design DS which supports O(1) insert delete and search.
2. Exploring how vectors can be used and associated time complexities.
3. Trying to optimize vectors for insert delete and search operation.
4. Self balancing binary search trees beat vectors in efficiency for such DS.
5. Challenge 2: Design required DS for integers when the integers are a under a given constraint, Solution to the challenge.
6. Concept of buckets and hash functions which will pave way for efficient hashSets.
7. Implementing the idea discussed.
8. Analyzing the time complexity and it's dependence upon number of buckets
9. Redesigning the bucket to further optimize performance.
10. Implementing the final DS and comparing it to unordered_set from C++ and hashSet from Java.

Enjoy Watching!!
Super useful books for algo ds and programming fundamentals!

Рекомендации по теме
Комментарии
Автор

I have actually in the past seen this all in just 1 round of a coding interview.
This is some useful theory and interesting challenges which will help you better understand the working of hashmaps.

Hope this helps.
Enjoy Watching!

AlgosWithKartik
Автор

Please create more implementation videos, this really helps us to understand the concept deeply.

TechieIndia
Автор

Nice explanation. I have one suggestion, implement a destructor for the hashset class in which you delete the containers.

aayushanand
Автор

Amazing explanation bhaiya! Thanks a lot!

codepractices
Автор

Awesome explanation , Thank you very much

rohitshinde
Автор

So does it mean that hashmap in java is better than unordered_map in c++ (since former implement bucket as self balancing bst and latter implements it using list ) ???

AyushGupta-mmjg
Автор

when they say Implement hashmap in intevriew during placement .. do they mean exactly this what you did in the video ? Please reply I'm a bit confused

freshcontent
Автор

Amazing video... I just have a few questions .
This implementation that uses balanced bsts as in java, why isn't c++ unordered map implemented the same way.
Are there any disadvantages of using that?
If not then could unordered map be changed to use balanced bsts for less time complexity?

AZ-khex
Автор

which software are you using for drawing on sublime.

crazyfootball