希尔算法

for (int step = array.length / 2; step > 0; step /= 2) {

       for (int i = step; i < array.length; i++) {

           int temp = array[i];

           int j = i;

           while (j >= step && temp < array[j - step]) {

              array[j] = array[j - step];

              j -= step;

           }

           array[j] = temp;

       }

    }
原文地址:https://www.cnblogs.com/Italianetz/p/3434055.html