private static int[] shellSort(int[] array,int step){
if(array!=null && array.length>1){ step = step/2; while(step>0){ for(int i =step;i< array.length;i++){ int key = array[i]; int j; for(j=i-step;j>=0 && j<array.length; ){ if(key<array[j]){ array[j+step]=array[j]; j =j-step; }else{ break; } } array[j+step]=key; } step = step/2; } } return array; }