Insertion sorting algorithm implementation. Also included invert order and unit testing