Basic Idea of bubble sort (1): In the number of a group to be sorted, the number of all numbers in the range not sorted yet, from top to bottom, compare and adjust the adjacent two numbers in sequence, so that a large number will sink and a small number will go up. That is, when the numbers of two adjacent parties are compared and their sorting and sorting requirements are opposite, they are exchanged. (2) Example: (3) using java to implement [plain] publi cclass bubbleSort {public bubbleSort () {int a [] = }; int temp = 0; for (int I = 0; I <. length; I ++) {for (int j = I + 1; j <. length; j ++) {if (a [I]> a [j]) {temp = a [I]; a [I] = a [j]; a [j] = temp ;}}for (int I = 0; I <. length; I ++) System. out. println (a [I]) ;}after a reminder from the Taoist friends, I found that the above is not an authentic Bubble sorting, So I corrected it: Authentic Bubble Sorting: [plain] public class bubbleSort {public bubbleSort () {int a [] = {49,38, 65,97, ,}; Int temp = 0; for (int I = 0; I <. length-1; I ++) {for (int j = 0; j <. length-1-i; j ++) {if (a [j]> a [j + 1]) {temp = a [j]; a [j] = a [j + 1]; a [j + 1] = temp ;}}for (int I = 0; I <. length; I ++) System. out. println (a [I]) ;}} but what is the first sort? It's a bit similar to sorting, but it's not. You can just look at the top of your fingers and try again and again! 6. quick sorting (1) Basic Idea: select a benchmark element. Generally, select the first or last element and scan the column to be sorted into two parts, some of them are smaller than the base element, and some of them are greater than or equal to the base element. At this time, the base element is in the correct position after its sorting order, and then the two parts are recursively sorted and divided using the same method. (2) Example: (3) Implement [plain] public class quickSort {inta [] = {, 54, 56,17, 18,23, 34,15, 35,25, 53,51}; public quickSort () {quick (a); for (int I = 0; I <. length; I ++) System. out. println (a [I]);} publicint getMiddle (int [] list, int low, int high) {int tmp = list [low]; // The first of the array is used as the axis while (low