javascript-datastructures-algorithms icon indicating copy to clipboard operation
javascript-datastructures-algorithms copied to clipboard

Why is the hash-table doesn't implement by an array?

Open jarvislin94 opened this issue 3 years ago • 0 comments

Hi team,

I saw that the hash-table is implemented by an Object {} not the Array [], is this by design? It seems that the Array type data structure can provide a better search efficiency.

image

file at: https://github.com/loiane/javascript-datastructures-algorithms/blob/7d33c7ccf5185144e9ab561f152cda841ab86f22/src/ts/data-structures/hash-table.ts

Bests, Jackson

jarvislin94 avatar Aug 19 '22 09:08 jarvislin94