Performance of Set Implementations (cont)
Assume O(1)
For sorted array, insert cost is: cost of find + cost to interpolate Two O(n) costs: linked list = k.n, hash table = j.n but j≪k (lists are shorter) If lists are sorted, use merge for ∪ and ∩ so O(n+m) Bit-map version restricts range of possible elements to 0..N-1 |