hasing and collisions

Apr 24, 2012 at 3:41pm
How would hashing be used to implement a table abstract data type? How would the basic operations of insert, delete, and retrieve be implemented?

This is a question from a book I've been reading and I can't seem to come up with an answer. Can anyone help?
Apr 24, 2012 at 5:37pm
Search for "Hash Table" and "Bucket" and you'll get some information. Basically, objects that get put in get sorted into "buckets" (buckets are identified by hash codes), and the object's hash code determines which bucket it goes into. A collision occurs when two objects have the same hash, so buckets need to be able to to hold more than one liter of object liquid ;)
Last edited on Apr 24, 2012 at 5:38pm
Topic archived. No new replies allowed.