Lecture 26
Learning objectives
After this class, you should be able to:
- Given a hash function, the hash table size, and a sequence of insertions and deletions, draw the state of a chained hash table after the operations are complete.
- Give the worst case and expected case time complexities for hash table insertion, search, and deletion.
Reading assignment
- Section 5.3.
- Lecture: Hash tables.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Show the state of a chained hash table of size
23
after the following sequence of operations are complete. Also give the number of hash table entries searched for each of the following operations. Use the hash function in slide 11 of Lecture 24.insert("abcd"), insert("dbcd"), search("decd"), insert("abdc"), insert("bbcd"), insert("dabc"), insert("decd"), delete("abdc"), search("dabc"), search("abdc")
.- Questions on next lecture's material
- Suggest a suitable strategy for resolving collisions in a hash table without chaining.
Last modified: 31 Oct 2011