What is the name of the following sorting method?
It seems to be the opposite of bubble sort, with lighter elements going in their proper positions first. However, this one does not compare a[j] with a[j+1], as the normal bubble sort does.Code:
for (i=0; i<n-1; i++)
for (j=i+1; j<n; j++)
Looks very simple, and I wonder why I couldn't find it anywhere on the net!