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
  • Наука та технологія

КОМЕНТАРІ • 23

  • @kavehtehrani
    @kavehtehrani 9 місяців тому +7

    Keep up the good work my dude these videos are very good!

  • @TheMasterAngel
    @TheMasterAngel 8 місяців тому +3

    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 :)

    • @TechWithNikola
      @TechWithNikola  8 місяців тому +1

      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.

  • @stundogha4947
    @stundogha4947 10 місяців тому +4

    Thank you for your very thorough work.

    • @TechWithNikola
      @TechWithNikola  10 місяців тому +1

      My pleasure! I’m glad you’ve enjoyed it.

  • @MahmoodHasand3
    @MahmoodHasand3 8 місяців тому +1

    BEST EXPLAINATION BY FAR .PERIOD!

  • @ug1131
    @ug1131 9 місяців тому +2

    Thank you for this informative video kudos keep it up👏🏾

  • @erictrinque6513
    @erictrinque6513 6 місяців тому

    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.

    • @TechWithNikola
      @TechWithNikola  6 місяців тому +1

      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.

  • @kikithelord6602
    @kikithelord6602 9 місяців тому

    That's a very good explanation of hashmaps. Thanks for your video

    • @TechWithNikola
      @TechWithNikola  9 місяців тому

      You’re welcome. I’m glad you like it!

  • @pcrestarting8896
    @pcrestarting8896 8 місяців тому +1

    Thank you for the vid, I kind of understand Hash maps now

  • @nehdiwmbcuow868
    @nehdiwmbcuow868 6 місяців тому

    Great video!

  • @puneetkumarsingh1484
    @puneetkumarsingh1484 5 місяців тому

    Irrelevant point, but it is nice to see the IMMUNE in your library. I also bought the book a couple of months ago.

  • @nasamind
    @nasamind 9 місяців тому +1

    Awesome

  • @abhaynambiar7044
    @abhaynambiar7044 7 місяців тому

    what happens when using closed addressing and all slots are taken?

    • @TechWithNikola
      @TechWithNikola  6 місяців тому +1

      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.