Hash
Our complexity track record:
contains | insert | delete | iteration | |
---|---|---|---|---|
Array | O(n) | O(n) | O(n) | yes |
Linked | O(n) | O(c)+find | O(c)+find | yes |
BST | O(lg n) | O(lg n) | O(lg n) | yes |
makoto’s question
Hash table
- hashing function
- determinism, uniformity. range? invertible?
- the space / time tradeoff
- table with buckets modulo (%) ( collision )
collision
- separate chaining
- open addressing
- Linear probing, quadratic probing
- double hashing
Hash table
- O(c) but no iteration
- load factor and resize add some links for iteration
linear probing example
Assignment
ACSL style. Coming Monday
DUE MONDAY, 12/7 AT THE BEGINNING OF CLASS
resubmissions until winter break