

The term "bitmap" is overloaded and has several different meanings.
#Where to store phone during racr full
Otherwise, the ideal for a bitmap is when the hashtable is full and would result in a space saving of upwards of log_2(N). *Assuming a hashtable of unused elements would be used if there were more than N/2 elements else a hashtable of used elements would be used. However, storing 5x10^9 numbers in a hashtable would require roughly 32 bits for each number resulting in a total of about 1.6x10^11 bits, which is 16x (log N / 2) that of a bitmap. Resulting in a space saving of upwards of log_2(N)/2.*Īn example, is if you use a 10 digit phone number and half the numbers are used. A bloom filter is pretty much a cross between a hashtable and a bitmap it is mostly intended to limit the number of disk accesses and thus is of somewhat limited use in this case.Ī bitmap is generally better choice space-wise than a hashtable of used or unused elements if it contains more than approximately N/log(N) used or unused elements and becomes ideal* at when a hashtable of either unused or used elements is half full. Skip-list and Trees may have even worst performance. Trie/compressed trie would likely all be similar to a hashtable in terms of space/time performance. Seems like a hashtable or bitmap would indeed be ideal for that situation and it probably would be more space efficient and lookups would be somewhat faster to use a bitmap. Proceed through the checkered flag and slow to a cool-down lap.Interesting that you didn't mention a hashtable.

Slow down and watch for debris on the road. A flag with alternating yellow and red vertical stripes means that there is debris on the track (e.g., an oil slick).

Slow down and prepare to go off your line to avoid the car.
