public static void quickSort(int[] a, int left, int right) {
int f, t;
int rtemp, ltemp;
ltemp = left;
rtemp = right;
f = a[(left + right) / 2];
while (ltemp < rtem...
package m;import java.util.*;public class b {public static int[]a={2,34,14,56,78,97,90,13,11,45};public static void main(String[]args){chooseSort(10);System.out.println("the result is:");for(int t=0;t...
public static void shellSort(int[] a) {
int i, j, h;
int r, temp;
int x = 0;
for (r = a.length; r >= 1; r /= 2)
for (i = r; i < a.length; i++) {
temp = a[i];...
package tree1;import java.util.*;public class bt {public static int []a={1,5,7,0,9,2,4,377,91,12};public static void main(String[]args){bubble(10);System.out.println("input the data:");for(int i=0;i&l...
public static void bubbleSort(int[] a) {
int temp;
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length - 1; j++) {
if (a[j] > a[j + 1]) {
te...
public static void selectSort(int[] a) {
int temp;
int index;
for (int i = 0; i < a.length - 1; i++) {
for (int j = i + 1; j < a.length; j++) {
index = i;
i...