摘要:
void ShellSort ( vector<int> &v ) { int P = 4; int m[] = {5,3,2,1}; for ( int idx = 0; idx < P; idx++ ) { int len = m[idx]; for ( int sec = 1; sec < ( v.size()/len + ( v.size()%len != 0 ) ); sec++ ) { int end = ( sec*len + len ) < v.size() ? ( sec*len + len ) : v.si... 阅读全文