- 博客(3)
- 资源 (8)
- 收藏
- 关注
原创 字符串过滤
#define maxslot 256char nodeslot[maxslot] = {0};char hash(char value){ return (value & (maxslot -1));}//字符串过滤,去掉重复的字符,例如 输入:awaffqfqfcqfwqwfqfqccqwfdqqqqqqqqffffhifqfcnq 输出:awfqcdhi
2013-06-08 15:04:29 268
转载 经典排序算法c实现
//冒泡算法int Sort(int a[],int n){ int i,j; for(i = 0 ; i { for(j = 1 ; j { if(a[j - 1] > a[j]) { swap(a[j-1],a[j]);
2012-10-25 22:31:00 222
原创 atoi & itoa的c实现
int atoi(const char *str){ int numberic = 0; int sign = 1; if(str == (void *)0) { return numberic; } while(*str == ' ')++str; if(*str == '-' || *str == '+
2012-10-25 22:11:16 140
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人