Advantages of hash tables

If you think that hash tables are not that useful, handy, or smart, consider the following: When a hash table has n keys and k buckets, the search speed for the n keys goes from O(n) for a linear search down to O(n/k)! Although the improvement might look small, you must realize that for a hash array with only 20 slots, the search time will be reduced by 20 times! This makes hash tables perfect for applications such as dictionaries or any other analogous application where you have to search large amounts of data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.194.57