color the next element that is being inserted into the sorted part of the array with light blue we also highlight that character on the leftsince it is stored in the cur variable each row corresponds to an iteration of the outer loopand each copy of the array in row corresponds to an iteration of the inner loop each comparison is shown with an arc in additionwe indicate whether that comparison resulted in move or not an interesting thing happens in the insertion-sort algorithm if the array is already sorted in this casethe inner loop does only one comparisondetermines that