some algorithm test
To build this project,you need cmake 2.8 and ( Visual Studio 2010 Or gcc 4.7 on Linux)
Then, following these command:
-
svn co https://github.com/snnn/algorithm/trunk algorithm
-
cd algorithm
-
mkdir b1
cd b1
cmake .. -
make
make test -
src/SkipList.h : A SkipList.
-
src/fib.cpp: 以非递归的方式计算fib数列。
-
src/heap.h: 数据结构,堆。
-
src/hash.cpp: 一个简单的hash函数。 char[] -> uint32_t
-
src/randomImpl1.h: LCG随机数生成器。
-
src/sort.h: 几种排序算法
-
src/TASLock.h: TAS spin-lock algorithm
-
src/TTASLock.h: TTAS spin-lock algorithm