How to Insert One Element
p
The last
element
must also be
inserted.
Start by
copying it...
[0]
[1]
[2]
[3]
[4]
[5]
Sorted side
Unsorted side
The last element of the array also needs to be inserted. Start by copying it to a safe location.