Hash Tables and Hash Functions

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 1,5 тис.

  • @ryanbutterfield5038
    @ryanbutterfield5038 7 років тому +4215

    You deserve my data structures professor's salary

  • @nap163020
    @nap163020 9 місяців тому +36

    Why did I spend all that money on an engineering degree, when all I needed was this channel!!!

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

      Thanks for the complement. University does have it's benefits :)KD

  • @MartinBojmaliev
    @MartinBojmaliev 7 років тому +814

    Before 14 minutes, I thought I will never understand Hash Tables.
    Good work and Thank you.

    • @ComputerScienceLessons
      @ComputerScienceLessons  7 років тому +68

      They are actually quite simple in principal aren't they! Thanks for the comment.

    • @MartinBojmaliev
      @MartinBojmaliev 7 років тому +14

      We got the reason here why they are used and how ... then it's very easy to use them in the right way !

    • @maybecrazy6934
      @maybecrazy6934 4 роки тому

      same here, this video is so cool.

    • @stefanshapkarov184
      @stefanshapkarov184 Рік тому +1

      Exactly sir, very good video indeed.

    • @atanasatanasov5119
      @atanasatanasov5119 Рік тому +1

      He is a life saver isn't he?!

  • @ThePandaGuitar
    @ThePandaGuitar 6 років тому +1263

    Your voice sounds like a National Geographic documentary. Amazing explanation! Subscribed.

    • @Wow55579
      @Wow55579 4 роки тому +4

      This guy taught me ict when i was little trust me he sounds just like it

    • @joerj2460
      @joerj2460 4 роки тому

      ThePandaGuitar he’s my computer science teacher

    • @Peter-wm7fj
      @Peter-wm7fj 4 роки тому +2

      His British accent sounds so cool!

    • @rmapatipandey9217
      @rmapatipandey9217 4 роки тому +1

      😂😂😂😂😂😂😂

    • @coob404
      @coob404 4 роки тому +6

      he sounds a little bit like Tom Scott

  • @joegarza8391
    @joegarza8391 3 роки тому +282

    Years after, this video is still immensely valuable. This is what teaching is supposed to look like. Thank you for your amazing work!

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +22

      Thank you. Crikey! that was uploaded nearly 5 years ago! :)KD

    • @ThunderAppeal
      @ThunderAppeal Рік тому

      There are so many things wrong with this 'explanation' I'm not surprised that a half wit like you is impressed by this video.
      You defininetly have no idea what he is saying here. And he is talking utter nonsense.

    • @TheeSlickShady_Dave_K
      @TheeSlickShady_Dave_K Рік тому

      This video
      So clear and easy to understand
      Thank you
      🏆🏆🏆

    • @ThunderAppeal
      @ThunderAppeal Рік тому

      @@TheeSlickShady_Dave_K You understood nothing so you can stop pretending.

    • @TheeSlickShady_Dave_K
      @TheeSlickShady_Dave_K Рік тому

      @@ThunderAppeal haha got me!

  • @mrwess1927
    @mrwess1927 6 років тому +594

    This is what youtube is for. Just a clear explanation of interesting ideas. +1

    • @MisterWessells
      @MisterWessells 3 роки тому

      CAKE BAKING ua-cam.com/video/Ds9Jhu5E1sI/v-deo.html&ab_channel=MisterWessells

  • @tweedyburd007
    @tweedyburd007 2 роки тому +36

    You actually explain it as if we've never heard of the concept before! Something a lot of CS professors seem to not understand...

  • @abdullahakram4942
    @abdullahakram4942 5 років тому +20

    you basically summarized 3 whole lectures of class into just 14 minutes. You're a life saver!

  • @utsabshrestha277
    @utsabshrestha277 5 років тому +320

    Now this is a real education , so well described, you got the real tallent sir, really appreciating.
    You teaching approach can make anyone from zero to hero

  • @hotlinkster123
    @hotlinkster123 3 роки тому +116

    "indices are calculated from the data" thats literally all I needed to understand hash tables but surpirsingly I've never heard it once when people have mentioned them. Of course the bit on how to handle collisions was useful as well

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому +23

      Exactly - that is the essence of a hash table - it's that simple. A basic understanding of how physical RAM works explains why one memory location can can be accessed just as quickly as any other. :)KD

    • @saikumar2385
      @saikumar2385 2 роки тому

      Same for me

    • @das6109
      @das6109 Рік тому +2

      For me that part was intuitive, but I didn't understand how you would deal with that process creating multiple entries in the same index. This video was a big aha moment.

    • @Fandrir
      @Fandrir Рік тому

      That is exactly what i thought. Exactly that one piece of information that i was missing. I have no idea why that was never made clear anywhere else i looked.

  • @lucianojadur
    @lucianojadur 4 роки тому +44

    I've never thought I could find such well presented and easy-to-follow explanaition about this topic in less tan 15 minutes. It's a gem among stones.

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

    CS 260 student here and Chat GPT recommended this video. I can see why, this was so helpful as someone who literally has never coded a hash table into a project yet this video is exciting to see how I can store data and access it. Now I cant wait to start coding this into a project!

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

      Delighted to help. It's interesting to hear I have the attention of chatbots. :)KD

  • @kola844
    @kola844 5 років тому +23

    Professors should just play videos like this at the start of class. Would improve student performance immensely.

  • @PENCILARTAbhishekHimanshu
    @PENCILARTAbhishekHimanshu Рік тому +2

    can't stop myself to like this video. obsessed with the explanation

  • @deancj1
    @deancj1 3 роки тому +13

    This is the clearest, most concise explanation of this structure I've come across. Thank you! A lot of people really muddy this subject up.

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

    Absolute legend. The best introductory video I have seen so far on Hash Tables and Hash functions. Thank you, Thank you, Thank you 😊😊😊

  • @kevin_machine_learning
    @kevin_machine_learning 5 років тому +12

    Some Profs can, of course, explain what is hash table, but you just do that in about 10 mins!!!
    Your explanation is so clear and easy to understand, I think that is what students are looking for! Thank you Sir!

  • @tinojaa6749
    @tinojaa6749 2 роки тому +16

    In a perfect world every teacher would be as clear as this guy :)

  • @Lexoka
    @Lexoka 5 років тому +95

    The video is very, very, very well made. That's a great deal of information in just under 14 minutes, and it is very clearly presented. You've more than earned a new subscriber.

  • @patrickd791
    @patrickd791 4 роки тому +2

    Really eloquent description of the subject. This is the first time I feel like I actually know something about Hash Tables. Thank you.

  • @victorboateng5449
    @victorboateng5449 2 роки тому +6

    This was posted 5 years ago but I can say it is still relevant today. Appreciate the wonderful explanation

  • @descarteslancaster9843
    @descarteslancaster9843 3 роки тому +1

    This should be the goal of all teachers. clear in logic, super easy to understand.

  • @MdMainuddinJU
    @MdMainuddinJU 5 років тому +18

    This is one of the best lectures I have ever found to understand something clearly and precisely, yet in a reasonably short time.

  • @ClaudiaC-du5xr
    @ClaudiaC-du5xr 24 дні тому +1

    first video I've seen so far that actually explains the fundamentals behind what is hashing

  • @neeyatiajmera869
    @neeyatiajmera869 4 роки тому +20

    By far one the best explanation videos I've ever watched. The most useful 14 minutes of my life. Thanks!

  • @chasingthestereotype6420
    @chasingthestereotype6420 4 роки тому +2

    thank god you decided to record youtube videos. You just destroyed my fear of hashing in under 15 minutes, you have my eternal gratitude

  • @keeperkell13
    @keeperkell13 5 років тому +6

    I don't normally comment on videos but this was the most helpful explanation of what a hash table is and how to use one. I have been looking for good articles and videos for a couple of hours before I found this video! So thank you!

  • @789juggernaut
    @789juggernaut Рік тому

    This video is a small miracle in the way it so concisely and clearly explains the concept. If the same technique was applied to all college-level computer science concepts, you'd finish your CS degree in 18 months.

  • @charles-y2z6c
    @charles-y2z6c 5 років тому +9

    I just found this. As a professional with 30 year experience with data analysis you are spot on, well explained. I subscribed and set notifications on, hope to see plenty more from you.

  • @expertz
    @expertz Рік тому +1

    It is very hard to find a video that is this concise and easy-to-understand at the same time. Everything is summarized perfectly

  • @sushruttabakade6088
    @sushruttabakade6088 5 років тому +5

    Tens of books couldn't teach me what you just did in a couple of minutes. you are fantastic!!!

  • @Fandrir
    @Fandrir Рік тому +1

    I was about to give up on understanding Hash Tables and then finally i find this video that makes it so damn clear and comprehensible. I don't know why, but that one piece of information that tells us, that the position in the array is CALCULATED using the content of the key is never mentioned anywhere, while to me that was the most important piece of the puzzle. Thanks a lot!

    • @ComputerScienceLessons
      @ComputerScienceLessons  Рік тому +1

      You are most welcome. Another part to the puzzle is realizing that a single memory address is actually a row reference and a column reference. Hence one memory location can be accessed just as quickly as any other. You might light my series about DRAM. :)KD

  • @Xx-Anwar-xX
    @Xx-Anwar-xX 3 роки тому +3

    ok this was brilliant . we need more teachers like you . understanding whats going rather than just learning by heart .

  • @CarlNeuDitters
    @CarlNeuDitters 4 роки тому +1

    Fantastic. Not only did you lay out the problem well, and explain how hash tables work but you even set a good example of what any kind of teaching should be.

  • @insofcury
    @insofcury 4 роки тому +3

    This just cleared every possible doubt that I could possibly have related to hash tables.

  • @donaldkeith139
    @donaldkeith139 2 роки тому +2

    Came to learn about Hash tables.
    Stayed for the accent.
    Subbed and liked for the brilliant explanation!

  • @arielspalter7425
    @arielspalter7425 5 років тому +7

    Fantastic tutorial. Just perfect pace, perfect intonation, perfect graphics and perfect depth to explain the topic to non-educated programmers like me. Subscribed!

  • @usamamushtaq703
    @usamamushtaq703 2 роки тому

    i have been searching on youtube for almost an hour but couldnt find an appropriate video of explanation of hash table until i find this video .....beautifull explanation

  • @rebeccataylor8188
    @rebeccataylor8188 5 років тому +4

    Never heard someone so hyped about hash tables, but I love it. Thanks for the great explanation!

  • @jorgeramos9350
    @jorgeramos9350 6 років тому +1

    I have reviewed several UA-cam explanations about hash tables and hash functions, and none come close to this one. It was clear and to the point. Great job and thank you!

  • @WaqasAhmadVlogs
    @WaqasAhmadVlogs 5 років тому +8

    Holy shit! You made it sound like a piece of cake. I've been hearing about hash tables for so long and always thought it must be a rocket science until now. Hats off to you sir

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

    I was getting tired after watching a bunch of videos on this subject and at the beginning of this one I was about to close it because I thought it's not gonna be engaging enough. I'm so glad I didn't, this was so interesting to watch and you explain it so simple and well. Thank you very much sir!!!

  • @lanat4260
    @lanat4260 5 років тому +4

    I spent hours trying to understand this for my final exam tomorrow to no avail. Until i came across your video! Thank you so much for this :)

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

    Thank you for the clear and concise explanation without making it sound like we're studing rocket science.

  • @polomame
    @polomame 6 років тому +3

    I don't normally like videos on youtube, but you helped me understand this concept.

  • @calciumcitrate1293
    @calciumcitrate1293 2 роки тому

    Have an organized and well-structured presentation helps students a bunch when introducing such new concepts. Instead, my dear professor just freestyled and droned forever during class. What a difference you made sir. Thank you

  • @casanovavzla
    @casanovavzla 5 років тому +3

    You just got me like 1:30 hour of sleeping instead of having to search the entire internet.... Thanks a lot! Suscribed!

  • @ganeshs2470
    @ganeshs2470 Рік тому +2

    I seriously appreciate the amount of clarity you have before delving in and making the concept much more easier and understandable. Seriously appreciate your explanation and presentation. Keep up and continue the good work.

  • @jannesvanquaillie9151
    @jannesvanquaillie9151 5 років тому +3

    This is a SUPER good video.
    I've always wondered how hash table worked.
    But I didn't think it was this genius.

  • @Rizzan8
    @Rizzan8 7 років тому

    You have explained Hash Tables in clearer and more pleasant way in 14min than my professor during 1,5h lecture. Thank you.

  • @Shalaby2002
    @Shalaby2002 Рік тому +5

    I just stumbled upon your video and I must say, you did an amazing job! Your clear and concise explanation helped me understand the concept better than any textbook or lecture ever could. Your use of examples and visual aids made the topic so much easier to grasp.

  • @hbahoo
    @hbahoo 2 роки тому +1

    a 14 mins video felt like 3 mins. while another video of 6 mins felt like an hour! thank you

  • @LandNfan
    @LandNfan 5 років тому +4

    Excellent video! I spent the last half of my 34 years in IT working with the Advanced Pick and Unidata databases which depend heavily upon hashed access. The key to efficiency is selecting the right modulus when creating your file. Too small and you get too many collisions, too large and you waste space. The multivalue database concept goes back to the mid-60’s, but it is still hard to beat for efficiency and ease of use.

  • @homeofsports3295
    @homeofsports3295 2 роки тому

    My compsci professor is useless. I'm subscribing to this channel as it will really help me to get through the remaining 3 years of my compsci degree. Thank you for your work!

  • @stephan553
    @stephan553 5 років тому +6

    One _very important_ case against open addressing is that any case where the key is not contained in the hash map can only be resolved in O(n) time, that is a time linear to the length of the whole map. Closed addressing can resolve this by simply traversing the much shorter list at the respective key.
    No matter if databases, caches or many other use cases, looking up a missing key is a very common situation.

    • @your-mom-irl
      @your-mom-irl Рік тому +1

      That shouldn't matter much if the load factor is kept low and the hash function has a good distribution, but yeah it is a possibility lol
      A uniform distribution with 50% load factor will give you an average of just 1 miss

  • @plekkchand
    @plekkchand 4 роки тому +1

    Proper explanations, logically and clearly expounded, in comprehensible English. This sort of material is by no means easy to find.

  • @herokim5113
    @herokim5113 5 років тому +3

    You are the best voice actor in CS. You deserves it!

  • @sonnybrown4758
    @sonnybrown4758 3 роки тому +1

    This is the first video about hash tables hash maps linked lists that I actually understood. Thank you.

  • @VolkWasHere
    @VolkWasHere 5 років тому +33

    Give this man a Medal, thank you!

  • @doomedoptimism1015
    @doomedoptimism1015 Рік тому +2

    Best explanation I have heard yet to explain hash tables, bravo. To me when I think of what is an elegant solution to a complicated problem, it doesn't get much better than this kind of thing.

    • @ComputerScienceLessons
      @ComputerScienceLessons  Рік тому

      Thank you so much. I do agree, some of these standard data structures and algorithms are pure genius :)KD

  • @ryanbarry7670
    @ryanbarry7670 5 років тому +6

    Better explanation than my tutor did in 3 hours! So cool, thanks for posting the video!

  • @yoseph8304
    @yoseph8304 7 років тому

    LOVED IT.
    i don't know why the lecturers at my university aren't teaching like this.
    i felt i wasted my two hour at the lecture hall learning a fraction of what i just did in 15 min.

  • @GoddamnAxl
    @GoddamnAxl 5 років тому +3

    You sir deserves a medal;

  • @KoomeMwiti
    @KoomeMwiti 4 роки тому +1

    Someone mentioned hashmaps work like magic, I disagreed and decided to find an explanation that makes sense. I'm validated and thank you!

  • @mushusax
    @mushusax 7 років тому +198

    The examples he uses are real. Ex:
    Bea = Beatrice Tinsley; created galaxy models
    Ada Lovelace = Ada Lovelace; the first programmer

    • @ComputerScienceLessons
      @ComputerScienceLessons  7 років тому +184

      Mostly...
      Beatrice Tinsley (Astronomer)
      Tim Berners Lee (Computer Scientist of WWW fame)
      Leo Adelman (Mathematician of RSA fame)
      Jan Łukasiewicz (Logician of reverse Polish notation fame)
      Lou Kauffman (Mathematician - of polynomial fame)
      Max Newman (Mathematician and code breaker)
      Ada Lovelace(Computer Scientist)
      Ted Nelson (Computer Scientist and Philosopher)
      Sam (Sam Malone - the guy in Cheers)
      Mia (the space station)
      Zoe (Zoe Saldana - Guardians of the Galaxy, Star Trek)

    • @Afdch
      @Afdch 5 років тому +4

      @@ComputerScienceLessons Except the space station is MIR, not MIA. Just saying.

    • @ComputerScienceLessons
      @ComputerScienceLessons  5 років тому +22

      мое орфографическое отстой

    • @SJ23982398
      @SJ23982398 5 років тому +7

      Yeah and Tod is real too. Tod Einstein. Famous for drinking a relatively large amount of beer in a very short amount of time.

    • @charles-y2z6c
      @charles-y2z6c 5 років тому

      M Detlef she died. A life of debauchery is often short.

  • @himanshunahak5105
    @himanshunahak5105 4 роки тому +1

    I have been watching many videos, but This video has explained Hash tables in the best possible way!

  • @intrepidsouls
    @intrepidsouls 4 роки тому +4

    That is what we call a man born to be a teacher.

  • @MinecraftLetstime
    @MinecraftLetstime 6 років тому

    I don't know if Hash tables are simple or this guy just explained it perfectly. What a legend! Thank you so much!

  • @AhmetHDonmez
    @AhmetHDonmez 3 роки тому +7

    Just incredible, thank you for your time and efforts for these incredible videos. Your teaching abilities are through the roof!

  • @kardelenbuz450
    @kardelenbuz450 4 роки тому +2

    ı've been listening for a whole year from my professor and couldnt understand any of these... now even i cant believe that i got the point . thank you so much

  • @daniloradulovic7646
    @daniloradulovic7646 5 років тому +3

    Basically i listened 2min of your video and i understood everything good job man!

  • @bubblez9266
    @bubblez9266 6 років тому

    13 minutes of your video explained more than one and a half hour of my datastructure lessons. Thank your very much!!!

  • @AdiPrimandaGinting
    @AdiPrimandaGinting 6 років тому +38

    You have a fine English accent, Mate. It helps my brain gear run smooth

    • @Maadhawk
      @Maadhawk 5 років тому +5

      He sounds like the guy who presents "Explaining Computers", and if he is the same guy, wouldn't surprise me one bit given the topic of both channels.

    • @MisterWessells
      @MisterWessells 3 роки тому

      CAKE BAKING ua-cam.com/video/Ds9Jhu5E1sI/v-deo.html&ab_channel=MisterWessells

  • @m.l.c.m.madhawa4649
    @m.l.c.m.madhawa4649 Рік тому

    This is the clearest and most concise explanation I've come across

  • @monishagowda8928
    @monishagowda8928 5 років тому +7

    And that's how you teach!!! Thank you so much for such a clear explanation 😊

  • @whatdudeno6116
    @whatdudeno6116 3 роки тому +1

    This may be the most well paced, organized, and succinct instructional video I've watched, thank you!

  • @sujithav8871
    @sujithav8871 5 років тому +13

    very good explanation. after a long time, i found a good lecture for hash table. thank you so much for your wonderful lecture

  • @leonardomorel9412
    @leonardomorel9412 3 роки тому +2

    I often didn't understand where (or why) this "hash functions" came from, now I totally get it. Such a good explanation, thanks for the content!

  • @charlliemurphy8381
    @charlliemurphy8381 4 роки тому +3

    this dude saving lives in 2020

  • @cluuny
    @cluuny Рік тому +1

    I speak Spanish natively and I am trying to improve my English (everybody says that English opens doors and I am trying to open them), watching this video has been a double gain for me because I have understood perfectly the video and consequently I have understood how the Hash tables work, a respect for who has made this video.

  • @ron0studios
    @ron0studios 4 роки тому +4

    this is the most beautiful explanation of hashing I've ever come across. Well done! All the other vids take a cryptic description and focus more on big ideas like blockchaining and encryption/security. Having a nice bit-sized chunk really helps out! Thanks!

    • @ComputerScienceLessons
      @ComputerScienceLessons  4 роки тому +1

      Lovely comment. Thanks for making me smile :)KD

    • @pranavnyavanandi9710
      @pranavnyavanandi9710 2 роки тому

      I would like it if videos like this transitioned to such bigger concepts after giving a good foundational understanding like this. Would be real helpful, especially for beginners looking to advance.

  • @stocksking8372
    @stocksking8372 3 роки тому +1

    What???
    This is probably the most insane condensation of information I have ever seen.
    My professors put up a 2 hour lecture, with an additional 1 hour lecture of extra material if we needed it.
    Had no fking idea what they were talking about. This video, I completely understand it.
    Thanks.

    • @ComputerScienceLessons
      @ComputerScienceLessons  3 роки тому

      Thank you for the complement. Maybe you should send your professor a link to this video :)KD

    • @stocksking8372
      @stocksking8372 3 роки тому

      @@ComputerScienceLessons Haha perhaps, or at least to the others taking the course

  • @holdenmcgroin8917
    @holdenmcgroin8917 4 роки тому +3

    I had a light bulb moment after only 3 minutes into this lecture... amazing! Thanks!

  • @parthvirana4148
    @parthvirana4148 2 роки тому +1

    Some people are amazing coders but not amazing at explaining, and you are the exception

  • @katariegels258
    @katariegels258 3 роки тому +6

    You already got tons of love in the comments, but you deserve one more. Very well explained with simple, yet very useful, animations. Thank you very much for the great work! :-)

  • @tahseenhaque6036
    @tahseenhaque6036 6 років тому

    I would highly recommend this video for someone trying to understand hash tables and functions...nearly perfect

  • @kubamaruszczyk4043
    @kubamaruszczyk4043 5 років тому +5

    The best explanation I have encountered so far. Thank you!

  • @shubhamnagure7654
    @shubhamnagure7654 4 роки тому +1

    this is one of the easiest explanation came across over YT.

  • @sramaiah110784
    @sramaiah110784 6 років тому +8

    Very neat explanation! Thanks for the detailed picturization of how things are stored internally.

  • @mishalubich9366
    @mishalubich9366 4 роки тому +2

    Best Hash Table tutorial on UA-cam - it's simple and relatable. Thank you.

  • @safedupkid
    @safedupkid 5 років тому +4

    Excellent explanation. Appreciated the clarity and succinctness

  • @unitedtomato5444
    @unitedtomato5444 3 роки тому +1

    I like how he speaks without any pauses or mistakes.

  • @ashrocks8443
    @ashrocks8443 3 роки тому +3

    You are an absolutely amazing teacher sir,you have my respect 🙏

  • @ivankontenski4396
    @ivankontenski4396 2 роки тому

    You just compressed a 2h CS lecture into 13mins, good job. Even explained it better than my Prof.

  • @BorlandC452
    @BorlandC452 5 років тому +3

    I've been watching quite a few hash table videos lately. This is the best one I've come across.

  • @jsonslim
    @jsonslim 2 роки тому

    After checking several hashmap lessons I want to say that this is the best one

  • @jenjen3
    @jenjen3 5 років тому +4

    Great video, I'm totally new to this and actually understand hashmaps now. Thank you so much!

  • @nimatsergiu2942
    @nimatsergiu2942 6 років тому

    I don`t know what to say, suddenly the Hash Table became so easy to understand from an almost panic point. Thank you so much, I wish many other lecturers could give an explanation such as this one.

  • @GunelMammadova93
    @GunelMammadova93 5 років тому +5

    The best explanation of hash tables/functions! Thank you!

  • @ironbob11
    @ironbob11 3 роки тому +1

    Described way better than all the other videos I've seen on this topic. Thank you