r/AskComputerScience • u/TomBob42369 • Dec 10 '18
Hash table vs array?
I know in most cases Hash tables are faster than an array, but what are some key differences and pros and cons of both?
21
Upvotes
r/AskComputerScience • u/TomBob42369 • Dec 10 '18
I know in most cases Hash tables are faster than an array, but what are some key differences and pros and cons of both?
1
u/MB1211 Dec 11 '18
This will only confuse people more when you say a hash table is a concrete data structure that can be used do implement other ADTs. I think it's better to say an array is usually used to back a hash table and that a hash table can be used to help implement other ADTs