Table Method - Dynamic Hashing
Procedure HashEnqueue (X)
Hash to the appropriate bucket using a modulus
and a hashing function applied to X
Double the hash table size if the number of events
is greater than 2*number of buckets
Procedure HashDequeue
Search all buckets for the event with the minimum time
(make sure that time is within the current year)
If no events are found for this year (a year of empty buckets),
then take the minimum time event
Remove the item from the table
Halve the hash table size of the number of events
is less than 0.5*number of buckets
Procedure HashCancel (X)
Hash to appropriate bucket by applying the hashing function to X
Locate X and remove it from the bucket list