Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
void insertSort(int a[], int size) {
for (int i=1; i<size; i++) {
int t = a[i];
int j=i-1;
for (; j>=0; j--) {
if (a[j] > t) {
a[j+1] = a[j];
} else {
a[j+1] = t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.