CS
Lecture+11+Additional+Notes

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

• Notes
• 10

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

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!

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

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
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

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

Binary Tree
This is the end of the preview. Sign up to access the rest of the document.
• Winter '17
• leaf node

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern