well let's see
insertion sort should be something like this:
Code:
void InsertionSort (int A[ ], int N) {
int i,j,pom;
for (i=1; i<N ; i++ ) {
pom=A[i];
for(j=i; j>=1 && A[j-1]>pom ; j-- )
A[j]=A[j-1]
A[j]=pom;
}
}
so if for example we have sequence 6,4,1,8,7,5,3,2 so using insertion sort would look like this (if you need to see what have been done in every step )
that's the way that should be done insertion sort... that what you wrote that you have done... hm... don't know what to say
there can be misunderstanding of some kind : so we'll first this clarify than we'll continue to that sorting algorithm (quick sort)
Edit: ah sorry ... lol i just now realize that L1, L2,... are line 1, line 2 ... it's ok you are correct