RedBlackTree.insert

Puts a value with a key to the tree, 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

O(log(size))

Example

"sl/redBlackTree" useFile a:((12 "aaa")) makeRedBlackTree; 4 "bbb" a.insert a [print LF print TRUE] enum
Output:
{ key: 4; value: "bbb"; } { key: 12; value: "aaa"; }