希尔排序
public class ShellSort extends Object{
int data[]=new int[8];
int size=8;
public static void main(String[] args) {
ShellSort test=new ShellSort();
test.inputarr();
System.out.printf("你输入的原始数组是:");
test.showdata();
test.shell();
}
void inputarr() {
int i;
for (i=0;i=0&&tmp
插入排序
public class InsertSort extends Object{
int data[]=new int[6];
int size=6;
public static void main(String[] args) {
InsertSort test=new InsertSort();
test.inputarr();
System.out.printf("你输入的原始数组是:");
test.showdata();
test.insert();
}
void inputarr() {
int i;
for (i=0;i=0 && temp



