- 博客(3)
- 资源 (12)
- 收藏
- 关注
原创 QuickSort
Read Hoar's article "quicksort" published in "the computer journal". Try to understand quicksort algorithm further. I.Stratgy: The quicksort is based on the principle of resolving a problem into t
2010-12-25 19:56:00 568
原创 Counting 1-bits
练习统计正整数中1的个数。两个经典的算法 int OneNum_MnsOne(unsigned int aInt){ int num=0; while(aInt != 0){ num++; aInt = aInt & (aInt - 1); } return num; } int OneNum_DvdC
2010-12-18 22:31:00 439
原创 练习-打印正整数的二进制
看程序时,碰到一个问题,解决之余想起练习打印正整数的二进制。 //Convert an integer (>0) to a binary and print. void prn(char *p){ while(*p=='0') p++; while(*p != '/0'){ printf("%c ",*p); ++p;
2010-12-14 21:42:00 622
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人