javascript-datastructures-algorithms
javascript-datastructures-algorithms copied to clipboard
Why is the hash-table doesn't implement by an array?
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.
file at: https://github.com/loiane/javascript-datastructures-algorithms/blob/7d33c7ccf5185144e9ab561f152cda841ab86f22/src/ts/data-structures/hash-table.ts
Bests, Jackson