Insertion Sort
Grow a sorted prefix by inserting each next element into place — O(n²).
8
03
117
25
312
41
59
614
7Elements live in one contiguous block of memory — index access is O(1), but insert/delete must shift their neighbours.
Grow a sorted prefix by inserting each next element into place — O(n²).
Elements live in one contiguous block of memory — index access is O(1), but insert/delete must shift their neighbours.