Author | Message |
---|---|
G190852562
Posts: 162
|
Posted 14:47 Dec 08, 2014 |
4. Which hash table implementation strategy is feasible for load factors larger than 1? Both chaining and open addressing Since cryptographic hash functions do not have pathological data sets, use a cryptographic hash function. |
vsluong4
Posts: 87
|
Posted 20:48 Dec 08, 2014 |
4) Open addressing is usually implemented as an array of objects. Chaining is typically implemented as an array of linked lists. Open addressing: [Apple, Ant, Apricot, ...., Boy, Ball,....] Chaining: [Apple/Ant/Apricot/.../Boy/Ball/..., , , , ] In opening addressing, each index in the array gets at most 1 object. If you get a conflict at insertion, you find the next available open slot, either through sequential scan, rehashing, multiple hashing, ...., etc. In chaining, the first index could potentially have all of your objects. 5) A hash function is a function that maps an object to a corresponding index. The precise definition is more general, but not too important for our purposes. |