Skip to content

Instantly share code, notes, and snippets.

@Aedda
Created January 28, 2015 20:46
Show Gist options
  • Save Aedda/03a97c5d2b226ee21d39 to your computer and use it in GitHub Desktop.
Save Aedda/03a97c5d2b226ee21d39 to your computer and use it in GitHub Desktop.
for ( int j = 0 ; j < list.size() - 1; j++ ) {
for ( int k = j ; k < list.size(); k++ ) {
if (list.get(j) >= list.get(k)) {
Integer temp = list.get(j);
list.set(j, list.get(k));
list.set(k, temp);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment