随笔分类 -  Data Structure

摘要:1 # include 2 # include 3 # include 4 using namespace std; 5 int index(char *a,char *b) 6 { 7 int n=0;//父串偏移量,初始为0 8 while(a[n]!='\0') 9 ... 阅读全文
posted @ 2014-09-19 18:18 天天AC 阅读(169) 评论(0) 推荐(0)
摘要:1 # include 2 # include 3 using namespace std; 4 void BinaryInsertSort(int *_piArr,int len) 5 { 6 int i = 1,j = 0; 7 int low = 0; 8 int h... 阅读全文
posted @ 2014-09-17 22:38 天天AC 阅读(395) 评论(0) 推荐(0)
摘要:1 # include 2 # include 3 using namespace std; 4 void Insert(int *_piArr,int len) 5 { 6 int i = 1; 7 for(;i 0)&&(_piArr[j-1]>x))//前一个大于后一个12... 阅读全文
posted @ 2014-09-17 22:11 天天AC 阅读(226) 评论(0) 推荐(0)
摘要:合并排序 1 # include 2 # include 3 using namespace std; 4 void MergeArray(int a[],int alen,int b[],int blen) 5 { 6 int len = alen + blen -1; 7 ale... 阅读全文
posted @ 2014-06-10 20:54 天天AC 阅读(149) 评论(0) 推荐(0)
摘要:首先了解顺序表和链表的概念1.顺序表顺序表是在计算机内存中以数组的形式保存的线性表,是指用一组地址连续的存储单元依次存储数据元素的线性结构。线性表采用顺序存储的方式存储就称之为顺序表。顺序表是将表中的结点依次存放在计算机内存中一组地址连续的存储单元中。特点:(1)在顺序表中,各个表项的逻辑顺序与其存... 阅读全文
posted @ 2014-05-12 20:05 天天AC 阅读(12275) 评论(0) 推荐(0)
摘要:小希的迷宫Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21663Accepted Submission(s): 6620Problem Desc... 阅读全文
posted @ 2013-12-13 21:46 天天AC 阅读(276) 评论(0) 推荐(0)