 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Hashtable
doubling
|
|
|
|
– |
Some
insert() operations take time O(n) due to table
|
|
|
|
doubling
|
|
|
|
– |
Amortized
expected time per op is still O(1)
|
|
|
| • |
Union/Find
with weighted union and path
|
|
|
|
compression
|
|
|
|
– |
Worst-case
time for union() is O(1)
|
|
|
|
– |
Worst-case
time for find() is O(log n)
|
|
|
|
– |
Worst-case
time for a sequence of n operations (starting
|
|
from
singletons) is O(n a(n))
|
|
|
|
– |
Amortized
time per operation is O(a(n))
|
|