这是计数排序程序
(a)c[i](<=i<=n)中存放A数组中值为i的元素个数
(b)c[i](<=i<=n)中存放A数组中小于等于i的个数
(c)B中存放排序结果B[n]已经有序
(d)算法中有个并列for循环语句算法的时间复杂度为O(n)
.上三角矩阵第一行有n个元素第i行有n(i)+个元素第一行到第i行是等腰梯形而第i行上第j个元素(即aij)是第i行上第ji+个元素故元素Aij在一维数组中的存储位置(下标k)为
k=(n+(n(i)+))(i)/+(ji+)=(ni+)(i)/+ji+
[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []