Hash Table

  • Elshad Karimov


A hash table is a data structure of “associative arrays” that groups values in an index and sorts and retrieves data using a key/value mapping. It accomplishes the same goal in some cases like Swift dictionaries. However, the efficiency of hash tables is better than dictionaries. The time complexity for searching, inserting, and deleting is on average O(1), which means that regardless of the size of the input operation time remains constant. This solves the problem of the linear search operation which is costly and the time complexity is O(n). By calculating the hash value, we can find the index and place the value in this index and retrieve the value based on it.

Copyright information

© Elshad Karimov 2020

Authors and Affiliations

  • Elshad Karimov
    • 1
  1. 1.New YorkUSA

Personalised recommendations