孤独的猫

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2011年2月26日

摘要: 基数排序的C语言描述:#include<stdio.h>typedef struct{ int num; int next;}slcell; //静态链表的结点类型#define M 10int f[M];int e[M];int head=0;void distribute(slcell *a,int w){ int i; int last; for(i=0;i<10;i++) f[i]=-1; for(i=head;i!=-1;i=a[i].next) { last=(a[i].num/w)%10; if(f[last]==-1)f[last]=i;elsea[e[las 阅读全文
posted @ 2011-02-26 10:55 孤独的猫 阅读(309) 评论(0) 推荐(0)