Quadratic Probing Hash Table Example

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 124

  • @sameersingh5078
    @sameersingh5078 7 ปีที่แล้ว +48

    Best explaination I found after wasting hours on TH-cam! Thanks man.

  • @ellegy
    @ellegy 6 ปีที่แล้ว +15

    This was one of the best explanations of a CS concept I have found. Simple, straightforward. Thank you very much!

  • @JR-mk6ow
    @JR-mk6ow 5 ปีที่แล้ว +23

    This is relatively easy. But my professor made this seem like a extremely complex stuff.
    Thanks for the clean explanation.

    • @thekevinwang
      @thekevinwang 4 ปีที่แล้ว +6

      This is what academia does - take your money and make you feel dumb 🤣

    • @JR-mk6ow
      @JR-mk6ow 4 ปีที่แล้ว +2

      @@thekevinwang it's a public school. One of the best in Europe for CS / software dev

    • @doggydoggy578
      @doggydoggy578 3 ปีที่แล้ว

      Same, the PDF file we are given as learning material doesn't explain very well about three methods to find the next empty table slots, for this algorithm it doesn't even have details about the hash function: hash(k) = k + j^2 mod table_size.
      I feel like university just overcomplicate things lol. I learn more by watching TH-cam and understand all the concept much faster too.

  • @misz3
    @misz3 2 หลายเดือนก่อน

    You're getting me through my Data Structures class 7 years later, you're amazing ty man

  • @mantraug
    @mantraug 2 ปีที่แล้ว +1

    Really most of the world's students benefited from your explanation, thank you very much

    • @randerson112358
      @randerson112358  2 ปีที่แล้ว

      Thank you for the kind comment! I truly appreciate it!

  • @JamesTomy08
    @JamesTomy08 2 ปีที่แล้ว +1

    This is such a good explanation, a lot of the larger channels aren't this good! Thank you!!

  • @ingenious138
    @ingenious138 4 ปีที่แล้ว +2

    Finally -- someone that does the math.
    Thank you so much!!
    My professor kept circling around this and didn't give us this clear of an explanation -- You're a hero of epic proportions, sir!

  • @dearickmilton
    @dearickmilton 3 ปีที่แล้ว +3

    I'd been struggling with this for DAYZZZZZ!!! Watching this video helped me to get it sorted in my brain and on paper so that I could complete my school assignment in under an hour. GREAT VIDEO TUTORIAL!!! 😘

  • @chuaselo
    @chuaselo 8 ปีที่แล้ว +13

    This is the best explanation i have ever seen Thank You brother!

  • @AspergirlJahda
    @AspergirlJahda 4 ปีที่แล้ว +6

    So helpful! We're doing pseudocode in my class (I'm IT, not CS) so the way you have it written out also is really helpful

  • @lungelosbongakonke7019
    @lungelosbongakonke7019 ปีที่แล้ว

    I wish the book could have explained this concept the way you did so simple and straight forward thanks dude

  • @exodusfivesixfivesix8050
    @exodusfivesixfivesix8050 4 ปีที่แล้ว +1

    Finally a topic from class with somebody I can understand. Good video man!

  • @xCaleb
    @xCaleb 5 ปีที่แล้ว +3

    Thank you for your great service to students everywhere.

  • @dorianon2673
    @dorianon2673 ปีที่แล้ว

    Quite possible the best video on explaining a concept that i've seen. Thank you!

  • @jessicapeng6270
    @jessicapeng6270 5 ปีที่แล้ว +2

    This saved me reading the textbook for an hour. Thank you!

  • @farooqarshad9955
    @farooqarshad9955 4 ปีที่แล้ว +1

    awsome bro ... I dnt know why people have to make things complex .. this is the BEST !!

  • @scottbridge6751
    @scottbridge6751 4 ปีที่แล้ว +2

    Another great refresher. Perfectly explained. Just earned a subscriber.

  • @patrickstar561
    @patrickstar561 5 ปีที่แล้ว +28

    Thanks for the explanation, my right ear loved it

  • @dangerm4n127
    @dangerm4n127 3 ปีที่แล้ว

    thank you, you made me remember how easy and simple solving this, internet made it too complex

  • @paiqu3933
    @paiqu3933 5 ปีที่แล้ว +3

    Thank you for your video! Your explanation helps me a lot. So lucky that I find your channel. Already subscribed!

  • @uchejordy3255
    @uchejordy3255 4 ปีที่แล้ว +1

    Thanks so much man. This will really help with my finals.

    • @randerson112358
      @randerson112358  4 ปีที่แล้ว

      That's great to hear, thanks for watching!

  • @shabanamehr3368
    @shabanamehr3368 5 ปีที่แล้ว +4

    The best lecture on probing.

  • @Codeflix2024
    @Codeflix2024 5 ปีที่แล้ว +1

    I have an exam on this tomorrow so thank you from Ireland for explaining this! :)

    • @randerson112358
      @randerson112358  5 ปีที่แล้ว

      I'm glad my videos are helping others internationally. Thanks for the comment TheDARA7!

  • @shreyanshukumarjena7402
    @shreyanshukumarjena7402 6 ปีที่แล้ว +3

    Brother you nailed it!!.
    Very well explained!!

  • @o.k.8531
    @o.k.8531 2 ปีที่แล้ว

    Didn't enjoy it watching right before the exam. But did like it :D Ty

  • @MILZMUSIC
    @MILZMUSIC 5 ปีที่แล้ว +1

    Good job mate

  • @pf3820
    @pf3820 4 ปีที่แล้ว +1

    Super simple to understand, just subscribed 👍🏿

  • @jakobjensen8228
    @jakobjensen8228 2 ปีที่แล้ว +1

    Man these videos are amazing.

  • @kurchak
    @kurchak 3 ปีที่แล้ว

    Excellent video, as usual, but if you are a student then please make sure that this is the correct hashing method that your class is teaching. My course content was confusing so I came here looking for help, and it helped a lot, but unfortunately I didn't realize that this is a very different hashing method and I got all those problems wrong (even though I did them right based on this video). So just be certain that the hash function you use actually matches what you are learning. This one uses the key value instead of the index. My school wanted the index instead of the key. Live and learn I guess.

  • @gepliprl8558
    @gepliprl8558 4 ปีที่แล้ว +1

    I enjoyed it man, coz it's hell clear. Subscribed already.

    • @randerson112358
      @randerson112358  4 ปีที่แล้ว +1

      Thanks for subscribing Gepli PLR !

  • @zheweiwu682
    @zheweiwu682 5 ปีที่แล้ว

    Simply Clear and Brilliant

  • @moumitachakraborty1550
    @moumitachakraborty1550 5 ปีที่แล้ว

    Best video which I found till date.. thank you sir :)

  • @SasukeUchiha0330
    @SasukeUchiha0330 5 ปีที่แล้ว +2

    Thank you man, very clear explanation

  • @yslandrei
    @yslandrei ปีที่แล้ว

    thank you from the US Virgin Islands

  • @mostafatarekadam8861
    @mostafatarekadam8861 2 ปีที่แล้ว +1

    thank you, sir, you explained it very well

  • @oguzgonul2584
    @oguzgonul2584 2 ปีที่แล้ว

    Nice explanation mister. Thank you

  • @Sadie_Equestrian
    @Sadie_Equestrian 3 ปีที่แล้ว

    Wow you made that sound so easy, excellent video thanks so much.

  • @NOLAMarathon2010
    @NOLAMarathon2010 6 ปีที่แล้ว +1

    Nice job. The only criticism I have would be this: Maps consist of keys and values. In your case, the keys are the indices of the map. The values would be the numbers that you are inserting.

  • @megajoe811
    @megajoe811 ปีที่แล้ว

    Best explanation ever!

  • @bijaybhujel1836
    @bijaybhujel1836 5 ปีที่แล้ว +1

    Well explained. Thanks man

  • @zttack2327
    @zttack2327 10 หลายเดือนก่อน

    This may just be a lost comment on this old video, but it was super helpful! One question though. If you run into a collision, do the quadratic probing method, and get stuck in an infinite loop of collisions, is there a specific way to handle that such as just forgetting it and moving on? or should it just stop right there? Thank you again for the amazing video!

  • @radravzo
    @radravzo 6 ปีที่แล้ว +2

    You ARE the BEST ! THANK YOU SO MUCH BROTHER

    • @randerson112358
      @randerson112358  6 ปีที่แล้ว +2

      Hey man, no problem thanks for watching and the very positive comment. Comments like these that let me know my videos are helping others keep me going, so thank you brother.

  • @yifuli9390
    @yifuli9390 2 ปีที่แล้ว

    Helped me a lot, thank you!

  • @lidavid7809
    @lidavid7809 3 ปีที่แล้ว

    Sehr gutes Video! Explained very well and simple! Thank you sir! :)

  • @clintonemok2105
    @clintonemok2105 5 ปีที่แล้ว

    why may it not be possible to enter a new
    key into the hash table even though it is not yet full. Could you explain?

  • @leonelmessi3010
    @leonelmessi3010 2 ปีที่แล้ว

    what if the size is not given? should we take any size of the array?

  • @54M4R7H
    @54M4R7H 5 ปีที่แล้ว +1

    Thanks man!

  • @gexgexgex
    @gexgexgex 4 ปีที่แล้ว +1

    super helpful!! thank you!

  • @baba00eddy
    @baba00eddy 4 ปีที่แล้ว +1

    Great video!

  • @AbdulhamidHayredin-zk2ox
    @AbdulhamidHayredin-zk2ox ปีที่แล้ว

    Thank you, great explanation

  • @azhar.difa_
    @azhar.difa_ 6 ปีที่แล้ว +1

    thank you very much sir! greetings from indonesia

  • @Srry4RollingRocking
    @Srry4RollingRocking 6 ปีที่แล้ว +1

    Fantastic explanation. Thanks man!

  • @johnadams8207
    @johnadams8207 4 ปีที่แล้ว

    So how do we deal with infinite looping

  • @rupeshthakur3754
    @rupeshthakur3754 4 ปีที่แล้ว +1

    Got it.. Nice explanation

  • @Dra60oN
    @Dra60oN 8 ปีที่แล้ว +2

    Nice explanation brother.

  • @JamesOfKS
    @JamesOfKS 7 ปีที่แล้ว +1

    all fine and good but still haven't found anyone explain how to retrieve them. do you just start back at counter 0 and increment up j until you hit your index?

    • @JamesOfKS
      @JamesOfKS 7 ปีที่แล้ว +1

      oh and what do you do if you delete an item at j=0? do you shift everything down j-1?

    • @sanchousf
      @sanchousf 6 ปีที่แล้ว

      You just mark a deleted cell. stackoverflow.com/questions/27215704/double-hashing-remove-and-rehash-function

  • @blackflame_
    @blackflame_ 6 ปีที่แล้ว

    Thanks bruh
    You helped me code it without problems!

  • @lauraedginton1532
    @lauraedginton1532 3 ปีที่แล้ว

    maybe im missing something but why is 76 6? did you times divide? how did you insert into 6

  • @Firefly-do6dd
    @Firefly-do6dd 5 ปีที่แล้ว +1

    you helped me a lot, thank you very very much :)

  • @YoungUnited
    @YoungUnited 6 ปีที่แล้ว

    Thanks a lot mate! Very good explanation. Just to double check, the total numbe rof collisions in that example would be 5 right?

  • @amitnigam1069
    @amitnigam1069 6 ปีที่แล้ว +1

    awesome explanation...Thanks

  • @codebro2485
    @codebro2485 3 ปีที่แล้ว

    ily. thank you for the videos lol

  • @Nora-lh3zs
    @Nora-lh3zs 6 ปีที่แล้ว +1

    THANK YOU THANK YOU THANK YOUUUUUU!!!!!!

  • @Mr13421772
    @Mr13421772 7 ปีที่แล้ว +1

    Good video, very helpful!

  • @Brekadab
    @Brekadab 6 ปีที่แล้ว +2

    I love you for dis

  • @big_cheese2162
    @big_cheese2162 5 ปีที่แล้ว +1

    thanks!

  • @busorenkin55
    @busorenkin55 5 ปีที่แล้ว

    so do you reset the counter j for every key you're inserting?

  • @DerNamenLose1222
    @DerNamenLose1222 4 ปีที่แล้ว +1

    Thanks!!

  • @strombolijones4255
    @strombolijones4255 6 ปีที่แล้ว +1

    THANK YOU

  • @shimingwei8103
    @shimingwei8103 2 ปีที่แล้ว

    thank you so much

  • @vickey_1910
    @vickey_1910 6 ปีที่แล้ว +1

    i really love you...you re the best...

  • @yaganarun236
    @yaganarun236 6 ปีที่แล้ว

    ThankYou so much .!! so well explained !! :-)

  • @itslogic9583
    @itslogic9583 3 ปีที่แล้ว

    Bro... thank you

  • @thefaned
    @thefaned 8 ปีที่แล้ว +11

    well done ! just like the ways i like my Steaks :)

    • @randerson112358
      @randerson112358  8 ปีที่แล้ว +2

      Haha very funny ! Thanks for watching !

  •  6 ปีที่แล้ว +1

    Obrigada! (Brasil)

  • @farooqarshad9955
    @farooqarshad9955 4 ปีที่แล้ว +1

    Subscribed you channel

  • @SchwadoGaming
    @SchwadoGaming 7 ปีที่แล้ว

    Nice tutorial! But why is 5 mod 7 = 6? would have worked out for presentation purpose with 6 as fourth number!
    I got the idea tho. Thanks buddy

    • @honebunni
      @honebunni 7 ปีที่แล้ว +1

      5 mod 7 = 5 in the video, but (5 + 1^2) mod 7 = 6, maybe you misread?

  • @schrodingerscat3912
    @schrodingerscat3912 6 ปีที่แล้ว +1

    cool

  • @cagankuyucu9964
    @cagankuyucu9964 6 ปีที่แล้ว

    At first I tought you were just another Indian and I was afraid that 99% of the video I wouldn't understand.

  • @koberowland9798
    @koberowland9798 3 ปีที่แล้ว

    I'm just gonna apply to McDonalds

  • @djjambo2821
    @djjambo2821 6 ปีที่แล้ว +1

    20 mod 7 was not 6!!!! Your "Math" was in fact wrong!!! It is actually 2.

    • @randerson112358
      @randerson112358  6 ปีที่แล้ว +5

      Please recheck your math, 20 mod 7 is 6. My "math" was in fact correct.

    • @djjambo2821
      @djjambo2821 6 ปีที่แล้ว +1

      can you tell me how you calculated it i think you are using the old conservative forumla which was discontinued in 2016 december 21 as of the new government Math Act.

    • @vondrook4
      @vondrook4 6 ปีที่แล้ว +8

      I don't think you understand modulo. It's not just how many times does 7 go into 20 evenly, it's the remainder after it's gone into it as many times as possible: 7*2 is 14 and then the remainder is 6 which gets you to 20

    • @djjambo2821
      @djjambo2821 6 ปีที่แล้ว

      Devin Johns nice . Thanks for the info!!!!!!!

  • @MikeyJoJo6385
    @MikeyJoJo6385 3 ปีที่แล้ว +1

    THANK YOU