摘要:
#include<iostream>using namespace std;void counting_sort(int* &a, int length, int k, int* &b, int* &c){ for(int i = 0; i < k + 1; i++) c[i] = 0; for(int i = 0; i < length; i++) c[a[i]]++; for(int i = 1; i < k + 1; i++) c[i] = c[i] + c[i-1]; for(int i = length - 1; i ... 阅读全文