void isort_c(unsigned *a, int n) { int k; for (k = 1; k < n; ++k) { int key = a[k]; int i = k - 1; while ((i >= 0) && (key < a[i])) { a[i + 1] = a[i]; --i; } a[i + 1] = key; } }
You need to create an account or log in to post comments to this site.
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
void isort_c(unsigned *a, int n) { int k; for (k = 1; k < n; ++k) { int key = a[k]; int i = k - 1; while ((i >= 0) && (key < a[i])) { a[i + 1] = a[i]; --i; } a[i + 1] = key; } }
You need to create an account or log in to post comments to this site.