Sort Colors

8
0
3
1
17
2
5
3
12
4
1
5
9
6
14
7

Elements live in one contiguous block of memory — index access is O(1), but insert/delete must shift their neighbours.