insertion sort without mem* using array of pointers