基数排序
摘要:
//基数排序#include<iostream.h>void funCount(int *count,int* a,int length,int num)//对应位上数字的个数{ for (int i=0;i<length;i++) { int x=a[i]; for (int j=2;j<=num;j++) { x=x/10; } x=x%10; count[x]++; }}void funIndex(int* count,int* index)//对应位上数字开始存放... 阅读全文
posted @ 2012-09-06 15:32 为梦飞翔 阅读(308) 评论(0) 推荐(0)
浙公网安备 33010602011771号