Skip to content

Instantly share code, notes, and snippets.

@pawigor
Last active August 29, 2015 14:27
Show Gist options
  • Save pawigor/bb93af47c8135ccfa38f to your computer and use it in GitHub Desktop.
Save pawigor/bb93af47c8135ccfa38f to your computer and use it in GitHub Desktop.
for (int i = 0; i < array.length - 1; i++) {
for (int j = i + 1; j < array.length; j++) {
if (array[i] < array[j]) {
int k = array[i];
array[i] = array[j];
array[j] = k;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment