idKey - 1
.insert
is called with (idKey, value)
:
a. Store value
at the index idKey - 1
in the array.
b. Initialize an empty list chunk
to store the output.
c. While the value at the pointer index is not None
:
i. Append the value to chunk
.
ii. Increment the pointer.
d. Return chunk
.