Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void listSortingDoubleForLoop(List<Integer> list){
- for (int i = 0; i < list.size(); i++){
- for (int j = i+1; j < list.size(); j++){
- if (list.get(i).compareTo(list.get(j)) > 0){
- Collections.swap(list, i, j);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment