码迷,mamicode.com
首页 >  
搜索关键字:seqlist    ( 152个结果
C语言【顺序表】顺序表的初始化,头插,尾插,头删,尾删,增删查改,全删
#define_CRT_SECURE_NO_WARNINGS1 #include<stdio.h> #include<assert.h> #include<stdlib.h> #include<string.h> #defineMAX_SIZE5 typedefintDataType; typedefstructSeqList { size_tsize; DataTypearray[MAX_SIZE]; }SeqList; //voidInitSeqLis..
分类:编程语言   时间:2016-01-18 20:55:58    阅读次数:250
C语言实现顺序表的增删查改以及排序
顺序表是线性表中的一种重要的数据结构,也是最基础的数据结构,今天我用C语言实现下线性表的基本操作,以及冒泡排序与选择排序在线性表中的算法实践,代码如下:seqlist.h:#ifndef__SEQLIST__ #define__SEQLIST__ #defineMAX5 #include<stdlib.h> typedefintDataType; t..
分类:编程语言   时间:2015-12-31 21:11:14    阅读次数:238
顺序表的基本操作
#include#define MAXSIZE 100//顺序表的结果定义typedef struct{ int data[MAXSIZE]; int num;}SeqList; //建立顺序表void CreateSeqList(SeqList *S){ S->num = 0;}...
分类:其他好文   时间:2015-12-10 23:29:09    阅读次数:251
c++ 模板
#include #include "SeqList.h"using namespace std;int main(){ SeqList test(15); int array[15]={2,5,8,1,9,9,7,6,4,3,2,9,7,7,9}; for(int i=0;iusing names...
分类:编程语言   时间:2015-11-29 21:25:03    阅读次数:239
C语言--顺序表
#pragmaonce//只编译一次 #include<memory.h> #include<assert.h> #include<stdio.h> #defineMAX_SIZE100 typedefintDataType;//数据类型重命名 typedefstructSeqList//定义结构体类型 { DataTypearray[MAX_SIZE];//数据段 size_tsize;//数据个数 }SeqList..
分类:编程语言   时间:2015-11-25 17:06:06    阅读次数:222
简单的动态顺序表实现
#pragmaonce #include<stdio.h> #include<assert.h> #include<malloc.h> #include<string.h> typedefintDateType; typedefstructSeqList { DateType*_array; size_t_size; size_t_capacity; }SeqList; voidInitSeqList(SeqList*pSeq) { assert(pSeq); ..
分类:其他好文   时间:2015-11-21 22:51:56    阅读次数:389
简单的动态顺序表的实现
#pragmaonce #include<stdio.h> #include<assert.h> #include<malloc.h> #include<string.h> typedefintDateType; typedefstructSeqList { DateType*_array; size_t_size; size_t_capacity; }SeqList; voidInitSeqList(SeqList*pSeq) { assert(pSeq);..
分类:其他好文   时间:2015-11-13 23:45:35    阅读次数:463
如何创建顺序表以及对标的一些操作
#include<stdio.h>#include<string.h>#include<memory.h>#include<assert.h>#defineMAX_SIZE100typedefintDataType;typedefstructSeqList{DataTypearry[MAX_SIZE];size_tsize;}SeqList;//定义一个结构体顺序表voidInitSeqList(SeqList*pSeq){memset(pS..
分类:其他好文   时间:2015-11-13 06:41:31    阅读次数:248
c 语言 动态顺序表
#ifndef__SEQLIST_D__//头文件 #define__SEQLIST_D__ #defineCAPICITY4 typedefintDataType; typedefstructSeqList_D { DataType*_Array; size_t_size; size_t_capicity; }SeqL,*pSeqL; voidInitSeqList(pSeqLseq); voidPrintfSeqList(pSeqLseq); voidPushBack(pSeqLseq,..
分类:编程语言   时间:2015-10-20 19:41:51    阅读次数:230
【C语言】顺序表,数组
顺序表的搭建,就是一个本身的结构,利用的是数组,开辟的内存空间大小是固定的。没有链式结构那样的开辟空间的可控性。最基本的数据结构认知。然后我们来看看数据结构中的基本实现和思想:#include"seqList.h" #include<stdio.h> #include<assert.h> //顺序表的初..
分类:编程语言   时间:2015-10-17 07:07:18    阅读次数:149
152条   上一页 1 ... 8 9 10 11 12 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!