Extending Array, Swap and Insertion Sort