Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 1
    "rule of thumb is: For a given value to be inserted, bucket must be UNIQUE & DERIVABLE FROM THE VALUE that it is supposed to STORE." - this describes a perfect hash function, which is usually only possible for a few hundred or thousand values known at compile time. Most hash tables have to handle collisions. Also, hash tables tend to allocate space for all buckets whether they're empty or not, whereas your pseudo-code documents a create_extra_space_for_bucket() step during insertion of new keys. Buckets may be pointers though. Commented Aug 31, 2017 at 3:54