5 #ifndef DSALGLIB_SHELLSORT_H 6 #define DSALGLIB_SHELLSORT_H 11 template<
typename type>
14 long long int incr,cur,temp;
16 for(incr=(size-1)/2;incr>0;incr/=2)
18 for (cur = incr; cur <size; cur++)
21 for(temp=cur-incr;temp>=0&&var<arr[temp];temp-=incr)
23 arr[temp+incr]=arr[temp];
31 #endif //DSALGLIB_SHELLSORT_H
void shellsort(array< type > arr, long long int size)