cpp implementation of Insertion Sort List