When a bucket is deleted and it is in the middle of a chain, it cannot be freed and must remain in place. For example, if bucket 3 is deleted, it will be marked as unused but must still remain a part of the chain to bucket 4. When a bucket is deleted and all down chain buckets have also been deleted, then the chain may be broken. For instance, if bucket 3 is deleted and then bucket 4 is deleted, the chain from 3 to 4 cannot be broken. But if bucket 2 is deleted, its link to 3 can be broken and bucket 3's link to 4 can be broken.
Duplicates There is nothing wrong with adding duplicate keys to the hash table.
Of course they will wind up in the same chain and may not make any sense depending on the application. In addition to very fast searching, this class is designed to add and delete records quickly and efficiently. It has a mode of operation where large numbers of records can be added and deleted without the overhead of maintaining the hash table. This allows the application to push the hardware and operating system right up to their limits without wasting resources. The other mode of operation keeps the hash table within certain size and performance ranges.