# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from algo.structures import HashMap

# Use a small array to make collisions possible
hashmap = HashMap(len_array=2)

# +
data = ['Hello', 'world', '!']
keys = ['zero', 'one', 'two']

input_data = list(zip(keys, data))
# -

for data in input_data:
    hashmap.add(data[0], data[1])

for key in keys:
    value = hashmap.get(key)
    print(value)



StarcoderdataJupyterScriptsDedupFiltered