Introduction to Hash Maps

Поделиться
HTML-код
  • Опубликовано: 21 июл 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 10 месяцев назад +8

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

  • @TheMasterAngel
    @TheMasterAngel 9 месяцев назад +4

    I usually don't comment on RUclips 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  9 месяцев назад +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.

  • @MahmoodHasand3
    @MahmoodHasand3 10 месяцев назад +1

    BEST EXPLAINATION BY FAR .PERIOD!

  • @erictrinque6513
    @erictrinque6513 8 месяцев назад

    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  8 месяцев назад +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.

  • @ug1131
    @ug1131 10 месяцев назад +2

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

  • @pcrestarting8896
    @pcrestarting8896 10 месяцев назад +1

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

  • @kikithelord6602
    @kikithelord6602 10 месяцев назад

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

    • @TechWithNikola
      @TechWithNikola  10 месяцев назад

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

  • @muriloteixeiradasilvasanto1571
    @muriloteixeiradasilvasanto1571 7 дней назад

    Very, very good!

  • @RagazzaInk
    @RagazzaInk 16 дней назад

    Thanks a lot ❤

  • @nehdiwmbcuow868
    @nehdiwmbcuow868 8 месяцев назад

    Great video!

  • @puneetkumarsingh1484
    @puneetkumarsingh1484 6 месяцев назад

    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 11 месяцев назад +1

    Awesome

  • @abhaynambiar7044
    @abhaynambiar7044 8 месяцев назад

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

    • @TechWithNikola
      @TechWithNikola  8 месяцев назад +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.