Skip to content

Instantly share code, notes, and snippets.

@completejavascript
Created September 11, 2018 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save completejavascript/8fbf9101e67737b1d2c07c06cde962fb to your computer and use it in GitHub Desktop.
Save completejavascript/8fbf9101e67737b1d2c07c06cde962fb to your computer and use it in GitHub Desktop.
void InterChangeSort(int *a, int N)
{
for(int i = 0; i < N - 1; i++)
for(int j = i + 1; j < N; j++)
if(a[j] < a[i])
swap(a[j], a[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment