
Algorithm & Interview question
文章平均质量分 72
AceLuffer
一定程度的简单就是美
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
哈希排序
#include using namespace std; #define MAX 16 void shellSort(int *data,int n) { int d; int temp; int i,j; d=temp=i=j=0; d=n/2; while(d>=1) { //以位置开始往后进行递增//原创 2013-10-28 18:58:18 · 811 阅读 · 0 评论 -
迷宫
.h #ifndef _STACK_H_ #define _STACK_H_ const int STACK_SIZE=8; typedef struct point{ int m_x; int m_y; bool operator!=(const struct point &diot); bool operator==(const struct point原创 2013-10-28 18:49:46 · 774 阅读 · 0 评论 -
文件内容的排序
F(Total)=Sizeof(DataSet) F(Sub)=sizeof(File1)+sizeof(File2)+…………………..+sizeof(Filen); F(Out)=sizeof(OutputFile); 其中:F(Total)=F(Sub)=F(Out); 那么为了知道DataSet的容量,那么可以使用系统调用stat函数来获得文件的容量;之后将数据读取了存储到n个临时原创 2013-10-28 18:47:37 · 1569 阅读 · 0 评论 -
hexToDec
#include using namespace std; bool hex_to_dec(const char* hex,int &dec); int main(int argc,char* argv[]){ const char* hex="abaaaC8907"; int dec=0; bool ret=hex_to_dec(hex,dec); if (ret原创 2014-02-20 11:00:43 · 3467 阅读 · 0 评论