No video

Hash Tables and Hash Functions

  Рет қаралды 1,598,497

Computer Science

Computer Science

Күн бұрын

This computer science video describes the fundamental principles of the hash table data structure which allows for very fast insertion and retrieval of data. It covers commonly used hash algorithms for numeric and alphanumeric keys and summarises the objectives of a good hash function. Collision resolution is described, including open addressing techniques such as linear and quadratic probing, and closed addressing techniques such as chaining with a linked list.

Пікірлер: 1 500
@ryanbutterfield5038
@ryanbutterfield5038 6 жыл бұрын
You deserve my data structures professor's salary
@ComputerScienceLessons
@ComputerScienceLessons 6 жыл бұрын
Why not send him a link to my channel :)
@annellysemathison2179
@annellysemathison2179 6 жыл бұрын
mine too. serves no purpose
@tushar6742
@tushar6742 6 жыл бұрын
Ha ha ha rofl
@SamKhan-kb3kg
@SamKhan-kb3kg 6 жыл бұрын
Bang on, I was thinking the same :-)
@alexanderbergkvist9224
@alexanderbergkvist9224 6 жыл бұрын
Haha x) Great video Kevin!
@MartinBojmaliev
@MartinBojmaliev 6 жыл бұрын
Before 14 minutes, I thought I will never understand Hash Tables. Good work and Thank you.
@ComputerScienceLessons
@ComputerScienceLessons 6 жыл бұрын
They are actually quite simple in principal aren't they! Thanks for the comment.
@MartinBojmaliev
@MartinBojmaliev 6 жыл бұрын
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 3 жыл бұрын
same here, this video is so cool.
@stefanshapkarov184
@stefanshapkarov184 Жыл бұрын
Exactly sir, very good video indeed.
@atanasatanasov5119
@atanasatanasov5119 Жыл бұрын
He is a life saver isn't he?!
@nap163020
@nap163020 6 ай бұрын
Why did I spend all that money on an engineering degree, when all I needed was this channel!!!
@ComputerScienceLessons
@ComputerScienceLessons 6 ай бұрын
Thanks for the complement. University does have it's benefits :)KD
@ThePandaGuitar
@ThePandaGuitar 6 жыл бұрын
Your voice sounds like a National Geographic documentary. Amazing explanation! Subscribed.
@Wow55579
@Wow55579 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 жыл бұрын
His British accent sounds so cool!
@rmapatipandey9217
@rmapatipandey9217 4 жыл бұрын
😂😂😂😂😂😂😂
@coob404
@coob404 4 жыл бұрын
he sounds a little bit like Tom Scott
@joegarza8391
@joegarza8391 3 жыл бұрын
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 жыл бұрын
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!
@hotlinkster123
@hotlinkster123 3 жыл бұрын
"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 жыл бұрын
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 Жыл бұрын
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.
@tweedyburd007
@tweedyburd007 2 жыл бұрын
You actually explain it as if we've never heard of the concept before! Something a lot of CS professors seem to not understand...
@mrwess1927
@mrwess1927 5 жыл бұрын
This is what youtube is for. Just a clear explanation of interesting ideas. +1
@MisterWessells
@MisterWessells 3 жыл бұрын
CAKE BAKING kzfaq.info/get/bejne/etlpfcummquVo30.html&ab_channel=MisterWessells
@abdullahakram4942
@abdullahakram4942 5 жыл бұрын
you basically summarized 3 whole lectures of class into just 14 minutes. You're a life saver!
@utsabshrestha277
@utsabshrestha277 5 жыл бұрын
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
@lucianojadur
@lucianojadur 3 жыл бұрын
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.
@kola844
@kola844 4 жыл бұрын
Professors should just play videos like this at the start of class. Would improve student performance immensely.
@deancj1
@deancj1 3 жыл бұрын
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.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@m.l.c.m.madhawa4649
@m.l.c.m.madhawa4649 Жыл бұрын
Yes I was also going to tell that, this is the clearest and most concise explanation I've come across
@victorboateng5449
@victorboateng5449 2 жыл бұрын
This was posted 5 years ago but I can say it is still relevant today. Appreciate the wonderful explanation
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Thank you :)KD
@Lexoka
@Lexoka 5 жыл бұрын
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.
@tinojaa6749
@tinojaa6749 2 жыл бұрын
In a perfect world every teacher would be as clear as this guy :)
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You are very kind :)KD
@samanthacrespo5745
@samanthacrespo5745 Жыл бұрын
Agreed!
@kevin_machine_learning
@kevin_machine_learning 5 жыл бұрын
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!
@keeperkell13
@keeperkell13 5 жыл бұрын
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!
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Thanks for talking the time to comment :)
@conermos
@conermos 4 жыл бұрын
A big thank you. 2 hours of lectures couldn't explain what you did in 1 KZfaq video.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are very welcome :)KD
@patrickd791
@patrickd791 4 жыл бұрын
Really eloquent description of the subject. This is the first time I feel like I actually know something about Hash Tables. Thank you.
@neeyatiajmera869
@neeyatiajmera869 4 жыл бұрын
By far one the best explanation videos I've ever watched. The most useful 14 minutes of my life. Thanks!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Glad to be of help. Thanks for the lovely comment. :)KD
@charlesbaldo
@charlesbaldo 5 жыл бұрын
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.
@TonyKingOfTheOzone
@TonyKingOfTheOzone 6 ай бұрын
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 6 ай бұрын
Delighted to help. It's interesting to hear I have the attention of chatbots. :)KD
@chasingthestereotype6420
@chasingthestereotype6420 4 жыл бұрын
thank god you decided to record youtube videos. You just destroyed my fear of hashing in under 15 minutes, you have my eternal gratitude
@lanat4260
@lanat4260 5 жыл бұрын
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 :)
@MdMainuddinJU
@MdMainuddinJU 5 жыл бұрын
This is one of the best lectures I have ever found to understand something clearly and precisely, yet in a reasonably short time.
@mubafaw
@mubafaw 7 ай бұрын
Absolute legend. The best introductory video I have seen so far on Hash Tables and Hash functions. Thank you, Thank you, Thank you 😊😊😊
@ComputerScienceLessons
@ComputerScienceLessons 7 ай бұрын
You're most welcome :)KD
@plekkchand
@plekkchand 4 жыл бұрын
Proper explanations, logically and clearly expounded, in comprehensible English. This sort of material is by no means easy to find.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you. I need to work om making it easier to find. :)KD
@arielspalter7425
@arielspalter7425 5 жыл бұрын
Fantastic tutorial. Just perfect pace, perfect intonation, perfect graphics and perfect depth to explain the topic to non-educated programmers like me. Subscribed!
@sushruttabakade6088
@sushruttabakade6088 5 жыл бұрын
Tens of books couldn't teach me what you just did in a couple of minutes. you are fantastic!!!
@expertz
@expertz 9 ай бұрын
It is very hard to find a video that is this concise and easy-to-understand at the same time. Everything is summarized perfectly
@ComputerScienceLessons
@ComputerScienceLessons 8 ай бұрын
Thank you :)KD
@charbelalam2648
@charbelalam2648 2 жыл бұрын
You literally are the only person to ever make me understand this mess. Thank you so so much!
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
I'm delighted to help :)KD
@WaqasAhmadVlogs
@WaqasAhmadVlogs 5 жыл бұрын
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
@Shalaby2002
@Shalaby2002 Жыл бұрын
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.
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you so much. I really appreciate comments like yours :)KD
@Brodkaproduction
@Brodkaproduction 3 ай бұрын
Your explanation of collisions and their solutions (5:06) is the most comprehensive I've come across while brushing up on my fundamentals during my job search. I'm elated I stumbled across your video. Thank you so much for this.
@CarlNeuDitters
@CarlNeuDitters 4 жыл бұрын
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.
@stephan553
@stephan553 5 жыл бұрын
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 Жыл бұрын
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
@insofcury
@insofcury 4 жыл бұрын
This just cleared every possible doubt that I could possibly have related to hash tables.
@RahulTandel
@RahulTandel 6 ай бұрын
Thank you for the clear and concise explanation without making it sound like we're studing rocket science.
@ComputerScienceLessons
@ComputerScienceLessons 6 ай бұрын
You're welcome :)KD
@ganeshs2470
@ganeshs2470 Жыл бұрын
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.
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you. You comment is much appreciated. :)KD
@casanovavzla
@casanovavzla 5 жыл бұрын
You just got me like 1:30 hour of sleeping instead of having to search the entire internet.... Thanks a lot! Suscribed!
@jannesvanquaillie9151
@jannesvanquaillie9151 5 жыл бұрын
This is a SUPER good video. I've always wondered how hash table worked. But I didn't think it was this genius.
@stocksking8372
@stocksking8372 3 жыл бұрын
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
@jorgeramos9350
@jorgeramos9350 6 жыл бұрын
I have reviewed several KZfaq 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!
@rebeccataylor8188
@rebeccataylor8188 5 жыл бұрын
Never heard someone so hyped about hash tables, but I love it. Thanks for the great explanation!
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
It's a Sunday morning pastime.
@polomame
@polomame 5 жыл бұрын
I don't normally like videos on youtube, but you helped me understand this concept.
@parthvirana4148
@parthvirana4148 2 жыл бұрын
Some people are amazing coders but not amazing at explaining, and you are the exception
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You're too kind. Thank you :)KD
@ioanacrisan3684
@ioanacrisan3684 7 ай бұрын
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!!!
@ComputerScienceLessons
@ComputerScienceLessons 6 ай бұрын
Thank you. You're very welcome :)KD
@LandNfan
@LandNfan 5 жыл бұрын
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.
@Democracyphobia
@Democracyphobia 3 жыл бұрын
ok this was brilliant . we need more teachers like you . understanding whats going rather than just learning by heart .
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you so much :)KD
@Fandrir
@Fandrir Жыл бұрын
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 Жыл бұрын
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
@doomedoptimism1015
@doomedoptimism1015 Жыл бұрын
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
@katariegels258
@katariegels258 3 жыл бұрын
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! :-)
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you. Comments like yours make my day. :)KD
@ryanbarry7670
@ryanbarry7670 5 жыл бұрын
Better explanation than my tutor did in 3 hours! So cool, thanks for posting the video!
@kardelenbuz450
@kardelenbuz450 4 жыл бұрын
ı'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
@ajayreddykanduru453
@ajayreddykanduru453 3 жыл бұрын
Very fortunate to find this great KZfaq channel
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@intrepidsouls
@intrepidsouls 4 жыл бұрын
That is what we call a man born to be a teacher.
@sujithav8871
@sujithav8871 5 жыл бұрын
very good explanation. after a long time, i found a good lecture for hash table. thank you so much for your wonderful lecture
@amanmishra6951
@amanmishra6951 3 жыл бұрын
This is the best video available on youtube for hashing. I mean really. I scoured youtube to understand this concept. But you explained it in such an awesome manner. I hate youtube for not recommending me this sooner. I love youtube bcoz it recommended me this.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thanks for the complement. Delighted to help :)KD
@descarteslancaster9843
@descarteslancaster9843 3 жыл бұрын
This should be the goal of all teachers. clear in logic, super easy to understand.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You're very kind :)KD
@herokim5113
@herokim5113 5 жыл бұрын
You are the best voice actor in CS. You deserves it!
@VolkWasHere
@VolkWasHere 5 жыл бұрын
Give this man a Medal, thank you!
@leonardomorel9412
@leonardomorel9412 3 жыл бұрын
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!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You're most welcome :)KD
@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
@GoddamnAxl
@GoddamnAxl 5 жыл бұрын
You sir deserves a medal;
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
I'm still waiting for the queen to get in touch. :)
@daniloradulovic7646
@daniloradulovic7646 5 жыл бұрын
Basically i listened 2min of your video and i understood everything good job man!
@mishalubich9366
@mishalubich9366 4 жыл бұрын
Best Hash Table tutorial on KZfaq - it's simple and relatable. Thank you.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thanks for the comment. Much appreciated. :) KD
@hbahoo
@hbahoo Жыл бұрын
a 14 mins video felt like 3 mins. while another video of 6 mins felt like an hour! thank you
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You're welcome :)KD
@AhmetHDonmez
@AhmetHDonmez 3 жыл бұрын
Just incredible, thank you for your time and efforts for these incredible videos. Your teaching abilities are through the roof!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You are very kind :)KD
@holdenmcgroin8917
@holdenmcgroin8917 4 жыл бұрын
I had a light bulb moment after only 3 minutes into this lecture... amazing! Thanks!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
It's all about light bulbs. :) KD
@manojt7012
@manojt7012 3 жыл бұрын
What the Hell!!! This was the best ever explanation video I have ever seen... Man you deserve all our appreciations
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you very much :)KD
@ron0studios
@ron0studios 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 жыл бұрын
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.
@charlliemurphy8381
@charlliemurphy8381 4 жыл бұрын
this dude saving lives in 2020
@PENCILARTAbhishekHimanshu
@PENCILARTAbhishekHimanshu Жыл бұрын
can't stop myself to like this video. obsessed with the explanation
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you so much :)KD
@himanshunahak5105
@himanshunahak5105 4 жыл бұрын
I have been watching many videos, but This video has explained Hash tables in the best possible way!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you :)KD
@AdiPrimandaGinting
@AdiPrimandaGinting 6 жыл бұрын
You have a fine English accent, Mate. It helps my brain gear run smooth
@Maadhawk
@Maadhawk 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 kzfaq.info/get/bejne/etlpfcummquVo30.html&ab_channel=MisterWessells
@monishagowda8928
@monishagowda8928 5 жыл бұрын
And that's how you teach!!! Thank you so much for such a clear explanation 😊
@ironbob11
@ironbob11 3 жыл бұрын
Described way better than all the other videos I've seen on this topic. Thank you
@789juggernaut
@789juggernaut 10 ай бұрын
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.
@kubamaruszczyk4043
@kubamaruszczyk4043 5 жыл бұрын
The best explanation I have encountered so far. Thank you!
@jenjen3
@jenjen3 5 жыл бұрын
Great video, I'm totally new to this and actually understand hashmaps now. Thank you so much!
@mudshovel289
@mudshovel289 Жыл бұрын
Thank you so much dude. So. Much. Imagine reading this in a textbook and nit understanding anything because it’s a bunch of text and you’re in an online class.
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You are most welcome :)KD
@felizdeannemayao4811
@felizdeannemayao4811 4 жыл бұрын
I love how excited, eccentric and passionate he sounds. Sounds very motivating for me!
@safedupkid
@safedupkid 5 жыл бұрын
Excellent explanation. Appreciated the clarity and succinctness
@BorlandC452
@BorlandC452 5 жыл бұрын
I've been watching quite a few hash table videos lately. This is the best one I've come across.
@kuyabongekamayeza1751
@kuyabongekamayeza1751 4 ай бұрын
I come across this page today. A game changer, I tell you!!!!!! Thank you sooo much.
@ComputerScienceLessons
@ComputerScienceLessons 4 ай бұрын
You're very welcome :)KD
@6locc6a6y_fps
@6locc6a6y_fps 7 ай бұрын
holy legend, i have 2 days left for my data structures project and you just saved me so much time. BIG LIKE
@ComputerScienceLessons
@ComputerScienceLessons 7 ай бұрын
Delighted to help :)KD
@stevesmith9447
@stevesmith9447 5 жыл бұрын
I got my BSCS 20 years ago and because I was an awful student, I didn't know until today how hash tables actually work - despite constantly relying on them as a software engineer. Divide the hash code by your allocated storage space - so obvious and I never thought of it. Now I'm wondering about using a binary tree instead of a linked list for closed address collision resolution. Slower to insert, but faster to retrieve, and probably less need to reallocate key space (though again slower to do so).
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
I love those light bulb moments.
@stevesmith9447
@stevesmith9447 5 жыл бұрын
@@ComputerScienceLessons Same! Been writing code for 35 years and I still find surprises in the basics all over the place.
@jacobgarwin5616
@jacobgarwin5616 4 жыл бұрын
So I read your comment awhile back and for some reason I just had an epiphany on it (the mind works in strange ways I know)... If you are using a binary tree for you collision resolution that would presume some sort of ordering to the data in hash table since the binary tree must have an ordering of nodes where the right child node is greater than the left child node, correct? So there wouldn't be a problem if you are storing primitives, but what if you are storing people objects? How would the binary tree know what order you want your objects in? If you initially chose to order the objects in the tree by the person's name but later wanted to locate an object via their age, you'd have to reorganize your trees. When storing objects and you are unsure of what data you are going to use to look them up, I feel it would be easier to use the linked list and simple linear search. I could be completely off base on this thinking so I'd love to hear your thoughts on it!
@stevesmith9447
@stevesmith9447 4 жыл бұрын
@@jacobgarwin5616 No reason you can't have multiple trees for ordering the same data by using different comparison functions. :)
@IZZY3201
@IZZY3201 2 жыл бұрын
@@jacobgarwin5616 you can sort by your arbitrary definition of value. Objects should have compareTo methods to be able to compare values between objects
@mushusax
@mushusax 6 жыл бұрын
The examples he uses are real. Ex: Bea = Beatrice Tinsley; created galaxy models Ada Lovelace = Ada Lovelace; the first programmer
@ComputerScienceLessons
@ComputerScienceLessons 6 жыл бұрын
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 жыл бұрын
@@ComputerScienceLessons Except the space station is MIR, not MIA. Just saying.
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
мое орфографическое отстой
@SJ23982398
@SJ23982398 5 жыл бұрын
Yeah and Tod is real too. Tod Einstein. Famous for drinking a relatively large amount of beer in a very short amount of time.
@charlesbaldo
@charlesbaldo 5 жыл бұрын
M Detlef she died. A life of debauchery is often short.
@shiyufan9403
@shiyufan9403 6 ай бұрын
I'm struggling learning the concept about hash map, and thank god I found this video, very easy to understand even for a beginner like me!!!
@ComputerScienceLessons
@ComputerScienceLessons 6 ай бұрын
Delighted to help :)KD
@0bbie610
@0bbie610 4 жыл бұрын
Definitely the best video on explaining hashtables iv come across
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you :)KD
@arlene5990
@arlene5990 5 жыл бұрын
omg i love your voice and your explanation it’s really clear, thank you!!!
@reca117
@reca117 7 жыл бұрын
Your videos are amazing quality. Keep it up
@ComputerScienceLessons
@ComputerScienceLessons 7 жыл бұрын
That's great to hear - Tnx
@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
@untiedshoelacesgaming
@untiedshoelacesgaming Жыл бұрын
The absolute best video I've found on this topic
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Glad to help :)KD
@ashrocks8443
@ashrocks8443 3 жыл бұрын
You are an absolutely amazing teacher sir,you have my respect 🙏
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you so much 😳 :)KD
@Wlodixpro
@Wlodixpro 5 жыл бұрын
Jesus I understood everything and this vid containes more than we have learned at my uni haha. Thanks a lot!
@hamdansiddiqui3294
@hamdansiddiqui3294 Жыл бұрын
We need teachers that explained like you
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You are very kind. Thank you :)KD
@geybriyel2416
@geybriyel2416 Жыл бұрын
finally, a clear and great visualization of the hash table. Thank you so much, this has been really helpful for me to understand the principle.
@cogs11
@cogs11 5 жыл бұрын
This was a great explanation ! I was even imaging how this could be coded.
Binary Tree 1. Constructing a tree (algorithm and pseudocode)
11:32
Computer Science
Рет қаралды 51 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 551 М.
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 8 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 14 МЛН
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 28 МЛН
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Understanding and implementing a Hash Table (in C)
24:54
Jacob Sorber
Рет қаралды 350 М.
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,3 МЛН
Top 7 Data Structures for Interviews Explained SIMPLY
13:02
Codebagel
Рет қаралды 171 М.
Hashing Technique - Simplified
17:04
Abdul Bari
Рет қаралды 754 М.
SHA: Secure Hashing Algorithm - Computerphile
10:21
Computerphile
Рет қаралды 1,2 МЛН
Python Hash Sets Explained & Demonstrated - Computerphile
18:39
Computerphile
Рет қаралды 115 М.
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 8 МЛН