Lecture+11+Additional+Notes - Lecture 11 Additional Notes...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 11 Additional Notes The additional notes are edited based on today’s discussion in classroom. In order to help you understand the hash table better and tree, I write down what we have discussed. Thank you! If you have any question in today’s class, please feel free to write to me [email protected] , and I am more than happy to discuss with you! Have a great day!
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Exercises (10 minutes) 1. Demonstrate what happens when we insert the keys 5, 28, 19, 15, 20, 33, 12, 17, 10 into a hash table with collisions resolved by separate chaining. Let the table have 9 slots, and let the hash function be . 2. Consider inserting the keys 5, 28, 19, 15, 20, 33, 12, 17, 10 into a hash table of length using open addressing. Illustrate the result of inserting these keys using linear probing with , and using double hashing with and
Image of page 2
Solutions 5 4 1 5 1 4 6 8 2 5 6 2 3 5 8 2 1 3 0 1 2 3 4 5 6 7 8 5 28 19 15 20 33 12 17 5 0 1 2 3 4 5 6 7 8 10 28 19 20 12 5 15 33 17 0 1 2 3 4 5 6 7 8 19 28 20 12 10 5 15 17 33 Linear probing No collision Double hashing
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Binary Tree
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern