I'm reading this book and encounter a data structure namely "Direct-address tables" is this and the array that we are familiar with the same ?
CodePudding user response:
A direct-address table is one of the many data structures that you can implement with an array, but that doesn't mean that they're the same thing.
A direct-address table can be implemented on disk, for example, in which case it's not an array.
An array can also be used as a hash table, a binary heap, a disjoint set data structure, an adjacency matrix, a string, etc., and in those cases the array is not a direct-address table.
When you are storing items of some kind in an array, and those items have keys that you use as the array index, then the array is a direct-access table.