This tutorial is an introduction to hash tables. A hash table is a data structure that is used to implement an associative array. This video explains some of the basic concepts regarding hash tables, and also discusses one method (chaining) that can be used to avoid collisions.

Wan’t to learn C++? I highly recommend this book


Connect one-on-one with a Programming Tutor. Click the link below:


Comments (46)

  1. this is the best video on the topic even if he did forget the triangle. very clear.
    improvements for version 2? you could use real names rather than 'person' and 'that person' and perhaps show a box with 'Paul' and '555 1943' in it.
    but otherwise it is perfect. i don't quite understand why other videos and books make such a meal of it.

  2. I've been searching for explanations on Hash for about an hour and it's thanks to you that I finally got the concept. Thank you!

  3. When explaining this, how come no one ever says it can be a object, dictionary, etc?

  4. Awesome video, congratulations about it. I have never whatched such a simple and undestandable explanation of the hash tables and collisions.

  5. Came in the comment section so I can see someone further explaining the matter but all I see is people crying over a "Triangle" like that shape is their Daddy

  6. If you have creative talents you'd like to showcase, such as cooking, music, painting, or even coding, you can build a profile on and connect with others who share similar interests, as well as find opportunities

  7. how can we retrieve the phone numbers if two persons have the same index value?…i mean there can be many ph. no.s at same index by chaining …how do we know which phone number belong to whom?

  8. I appreciate you first explaining the concept on paper before jumping into code like a lot of youtubers tend to do

  9. Hey! Thanks, Paul. I really appreciate you taking the time to make this video. It was super helpful. I love you! :*

  10. So as a complete beginner, I am curious of only one thing… How does the hash decide where to place the key? And is the reason that this exist, because it is to much time and intricacy to take the key and manually input it into the array? Thank you!

  11. This guy needs to socialize a little bit then only he can stop using names like 'thatperson' , 'somebody'! -_-

  12. But then how can we find out the "thatperson" 's details with only the index of 1? Or is it another part of the finding process? like right after we know "thatperson" is in index 1, we use another method to find the "thatperson" 's details?

  13. can you please make more videos on specifically: queues, graphs & graph traversals, tries, sorting algorithms(merge sort, quick sort, insert sort, heap sort, etc), and big-o notation?

  14. For those who question why not use an array instead? Well you can, just make sure you implement a hashing function. A dictionary at its simplest form is an array with a hashing function.

  15. What has three sides, three corners and angles that add up to 180 degrees? (Not a squiggly line). Apart from the squiggle a great video.

Comments are closed.