HashTable.insert
Puts an entry to the table, overwriting an old value if the key already exists.
Arguments
key
for the entry to put.value
of the entry to put.
Return values
None
Complexity
Amortized constant, O(size) in the worst case.
Example
Output:
{ key: 35; value: "element"; }
{ key: 19; value: "nineteen"; }
{ key: 0; value: "ZERO"; }
{ key: 32; value: { a: 0; b: 1; }; }
{ key: 34; value: "element"; }
{ key: 34; value: 135; }
{ key: -25; value: "element"; }