Implementation of Insertion Sort-another O(n^2) algorithm