(int arr[])
| 4 | |
| 5 | public class BubbleSort { |
| 6 | public static void bubbleSort(int arr[]) { |
| 7 | for(int turn=0; turn<arr.length-1; turn++) { |
| 8 | for(int j=0; j<arr.length-1-turn; j++) { |
| 9 | if(arr[j] > arr[j+1]) { |
| 10 | //swap |
| 11 | int temp = arr[j]; |
| 12 | arr[j] = arr[j+1]; |
| 13 | arr[j+1] = temp; |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | public static void modifiedBubbleSort(int arr[]) { |
| 20 | for(int turn=0; turn<arr.length-1; turn++) { |
nothing calls this directly
no outgoing calls
no test coverage detected