Introduction to Hash Maps
Вставка
- Опубліковано 2 чер 2024
- This video teaches you everything you need to know about hashmaps. I came up with the contents of this video when I was preparing for my interviews a couple of years ago, so I wanteto share what I think every software engineer should know about hash maps. Of course, there's a lot more to know about hash maps, and I might make more videos about it, but this one covers the key concepts and ideas.
By the end of this video, you will have a solid understanding of how hash maps work, why they are important, the differences between open and closed addressing, and the various techniques employed to optimize their performance, and so on.
Don't forget to like, share, and subscribe for more insightful videos on technology and programming. Let's dive into the world of hash maps together!
Resources:
* Examples of a good hash function: www.cse.yorku.ca/~oz/hash.html
* Closed Addressing Example: github.com/freezing/data-stru...
* Open Addressing Example: github.com/freezing/data-stru...
* Introduction to Algorithms by Cormen (affiliate link): www.amazon.co.uk/Introduction...
Visit my blog: techwithnikola.com
Join my discord: / discord
Timecodes
00:00 - Intro
00:16 - Why Hash Maps?
00:46 - What is a Hash Map?
01:21 - Hash Function
02:01 - Collisions
02:41 - Closed Addressing
03:19 - Complexity Analysis
04:06 - Load Factor
05:16 - Open Addressing
07:01 - Linear Probing
08:02 - Double Hashing
09:04 - Searching in Open Addressing
09:54 - Should I use open or closed addressing?
10:49 - What is a good hash function?
11:26 - Outro - Наука та технологія
Keep up the good work my dude these videos are very good!
Thanks a lot!
I usually don't comment on UA-cam videos, but I think you deserve my public praise for this one. It's super well explained and illustrated, really well done! Thanks for the effort on putting this together. Subscribing and watching your other videos :)
Thanks a lot! I'm really glad that you've found it useful, and thanks for taking the time to comment. Knowing that these types of videos are useful to people encourages me to make more.
Thank you for your very thorough work.
My pleasure! I’m glad you’ve enjoyed it.
BEST EXPLAINATION BY FAR .PERIOD!
Thank you!
Thank you for this informative video kudos keep it up👏🏾
Thanks a lot!
This channel is EXCELLENT I Greatly appreciate the information and presentation is 10/10 top notch. Please keep it coming. Invaluable as I am learning programming and algorithms.
Comments like yours keep me motivated to make more videos, so thank you for taking the time to write it. I’m so happy to hear that you’re enjoying the content.
That's a very good explanation of hashmaps. Thanks for your video
You’re welcome. I’m glad you like it!
Thank you for the vid, I kind of understand Hash maps now
You’re welcome!
Great video!
Thank you!
Irrelevant point, but it is nice to see the IMMUNE in your library. I also bought the book a couple of months ago.
:) it's a great book
Awesome
what happens when using closed addressing and all slots are taken?
Hi, regardless of whether all slots are taken or not, when using closed addressing the inserted element is added to the end of the linked list that represents the bucket. Therefore, this is not an issue for closed addressing. Did you mean open addressing by any chance? With open addressing, if all slots are taken then we can't insert a new element. This is usually avoided by resizing the hash map when it reaches certain size, e.g. 75%.
Hope that makes sense. Let me know if it's still not clear.