//we did a demo of 3 sorts: // bubblesort ~n rounds. At each round a "bubble" is moving and swap each pair if not in correct order so technically the max value of that round is moving towards the end // insertion sort ~n rounds. At each round we have a sorted array and want to insert a new value into its correct position // selection sort ~n rounds. At each round we find the minimum and put it at the begining Note:in the demo, it finds the maximum and put it at the end, instead // the above 3 sorts are slow for very big list (rought take n^2 to sort) // There are faster sorts like QuickSort and MergeSort, but we don't cover them in this course Sort.bubbleSort(new int[] {4,3,5,2,1}); Sort.bubbleSort(new int[] {1,2,3,4,5,6,7,8,9,10}); Sort.bubbleSort(new int[] {10,9,8,7,6,5,4,3,2,1}) Sort.bubbleSort(new int[] {4,3,5,2,1,3,4,2,4,9,2,0,3,12,32,32}); Sort.bubbleSort2(new int[] {4,3,5,2,1}); Sort.bubbleSort2(new int[] {1,2,3,4,5,6,7,8,9,10}); Sort.bubbleSort2(new int[] {10,9,8,7,6,5,4,3,2,1}) Sort.bubbleSort2(new int[] {4,3,5,2,1,3,4,2,4,9,2,0,3,12,32,32});