Sobes.tech
Junior — Middle

To which category of data does the hash table structure correspond?

sobes.tech AI

Answer from AI

A hash table corresponds to the category of associative arrays or dictionaries. It is a data structure that stores key-value pairs and provides quick access to values by key through the computation of a hash function. An example of a hash table in Python is the dict type:

my_dict = {'key1': 'value1', 'key2': 'value2'}
print(my_dict['key1'])  # outputs 'value1'