
数据结构&算法
wisage
一个不断探索未知世界的人……
展开
-
判断字符是否为英文字母
一个字节能表示0~255之间共256个数字,根据ASCII码英文字母A-Z和a-z按顺序排列,其中view plainprint?'A' = 65 = 0b01000001 = 0x41 'B' = 66 = 0b010000转载 2011-09-06 15:02:26 · 3463 阅读 · 0 评论 -
counting 1 bits C implementations
counting 1 bits C implementations(idea)by bisThu Oct 18 2001 at 4:34:42Here are C implementations of a原创 2011-08-09 19:11:44 · 11554 阅读 · 0 评论 -
murmur:更快更好的哈希函数(字符串转64位hash值)
unsigned long long MurmurHash64B ( const void * key, int len, unsigned int seed ){ const unsigned int m = 0x5bd1e995; const int r = 24; unsigned int h1 = seed ^ len; unsigned int h2 = 0; con转载 2011-12-27 09:42:31 · 29898 阅读 · 2 评论 -
【轻松学排序算法】眼睛直观感受几种常用排序算法
源自:http://www.cnblogs.com/wangfupeng1988/archive/2011/12/26/2302216.html有视频1 快速排序介绍: 快速排序是由东尼·霍尔所发展的一种排序算法。在平均状况下,排序 n 个项目要Ο(n log n)次比较。在最坏状况下则需要Ο(n2)次比较,但这种状况并不常见。事实上,快速排序通常明显比其转载 2012-01-06 18:28:23 · 1118 阅读 · 0 评论 -
一些经典排序算法的实现(C/C++实现)
#include iostream>#include strstream>#include vector>using namespace std;void Swap(int &a, int &b){ int temp = a; a = b; b = temp;}/* 冒泡排序 */转载 2012-02-03 12:36:51 · 830 阅读 · 0 评论