利用Java进行希尔排序(元素中有0会有问题),步长经过调试length/2+1最合适. import java.util.Scanner; public class HierSort { private static int array[] = new int[100000]; private static void setArray(int length){ Scanner scanner = new Scanner(System.in); System.out.println("Pleas…