

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Hashmaps
incomplete
2: Hash Function
incomplete
3: Insert
incomplete
4: Get
incomplete
5: Hash Map Review
incomplete
6: Resizing
incomplete
7: Linear Probing
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Now that we have some building blocks for our hashmap, we need a way to start inserting values.
Complete the insert method. It accepts a string key and an associated value (in this case, LockedIn user records).
The resulting structure should look something like this, with key-value pairs at some positions and empty slots at others:
[
(key, val),
None,
None,
(key, val),
None,
...
]
Indexes with an entry will contain a tuple, and empty indexes will contain the None value.