Skip to content

Instantly share code, notes, and snippets.

@completejavascript
Last active September 12, 2018 13:51
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/8cc86f59acea9397b45c2b3bd3121575 to your computer and use it in GitHub Desktop.
Save completejavascript/8cc86f59acea9397b45c2b3bd3121575 to your computer and use it in GitHub Desktop.
void BubbleSort(int *a, int N)
{
for(int i = 0; i < N-1; i++)
for(int j = N-1; j > i; j--)
if(a[j] < a[j-1])
swap(a[j], a[j-1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment