0
10kviews
Differentiate between Open Addressing and Chaining.
1 Answer
| written 7.1 years ago by | • modified 7.1 years ago |
| Open Addressing | Chaining |
|---|---|
| Also known as Closed Hashing | Also known as Open Hashing/ Closed Addressing |
| All elements would be stored in the Hash table itself. No additional data structure is needed. | Additional Data structure needs to be used to accommodate collision data. |
| In cases of collisions, a unique hash key must be obtained. | Simple and effective approach to collision resolution. Key may or may not be unique. |
| Determining size of the hash table, adequate enough for storing all the data is difficult. | Performance deterioration of closed addressing much slower as compared to Open addressing. |
| State needs be maintained for the data (additional work) | Performance deterioration of closed addressing much slower as compared to Open addressing. |
| Uses space efficiently | Expensive on space |