may delete the wrong key search for the key using

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ample: 765, 431, 96, 142, 579 create hash table of size 13: M = 13 HT = [None] * M h(key) = key % M ß། O(1) search(96) à༎ 5 HT[5] => True Collisions: - multiple keys may have the same hash value Example: add(226) h(226) - >5 ß། collision resolving collisions: linear probing (approach 1): - if i=h(newkey) already has a value !=None, - look at i+1, if it is empty,...
View Full Document

This note was uploaded on 02/04/2014 for the course CS 234 taught by Professor Baranoski during the Spring '09 term at Waterloo.

Ask a homework question - tutors are online