0

What makes a Hash Table efficient?

I was taught c++ at the local community college. There we learned most of the basic data structures, but we were never taught anything about hash tables, so I am asking the SoloLearn community to share it's knowledge!

15th Jan 2017, 5:27 PM
Martin Royal
Martin Royal - avatar
1 Réponse
+ 2
Hashing is constant time, O(1), irrespective of the data set size. That's its advantage over other random access collections which are O(n) (eg linked list). Vs arrays, hashed collections needn't reserve memory for their largest key, and they are free to use any key, not just integers. If I can explain anything else for you please Google :)
15th Jan 2017, 5:35 PM
Leon
Leon - avatar