码迷,mamicode.com
首页 >  
搜索关键字:seqlist    ( 152个结果
【C++】顺序表的实现
#include #include using namespace std; //typedef struct FindRet //{ // bool isFind; // 是否找到的标示 // size_t index; // 找到数据的下标 //}Findret; typedef int DataType; class SeqList { public: ...
分类:编程语言   时间:2015-08-25 21:39:37    阅读次数:141
【c++版数据结构】之顺序表的实现
SeqList.h #ifndef SEQLIST_H #define SEQLIST_H #include using namespace std; typedef enum{TRUE,FALSE}Status; template class SeqList { private: enum{DefaultSize = 10}; //顺序表的默认长度 Type *base; ...
分类:编程语言   时间:2015-08-19 14:57:11    阅读次数:161
几种常用排序算法温习
几种常用排序算法温习一、 简单排序方法1.直接插入排序基本思想:顺序地将待排序的记录按其关键码的大小插入到已排序的记录子序列的适当位置。算法代码: //直接插入排序 public static void InsertSort(SeqList seq) { ...
分类:编程语言   时间:2015-08-12 16:31:10    阅读次数:176
线性表的链式存储——C语言实现
SeqList.h#ifndef _WBM_LIST_H_#define _WBM_LIST_H_typedef void List;typedef void ListNode;//创建并且返回一个空的线性表List* List_Create();//销毁一个线性表listvoid List_Des...
分类:编程语言   时间:2015-08-01 23:20:25    阅读次数:125
栈的顺序存储 - 设计与实现 - API实现
Stack基本概念 栈是一种 特殊的线性表 栈仅能在线性表的一端进行操作 栈顶(Top):允许操作的一端 栈底(Bottom):不允许操作的一端 Stack的常用操作 创建栈 销毁栈 清空栈 进栈 出栈 获取栈顶元素 获取栈的大小  栈模型和链表模型关系分析 栈的顺序存储设计与实现 // seqlist.h // 顺序存储结构线性...
分类:Windows程序   时间:2015-07-13 16:23:09    阅读次数:139
顺序表的非递减数列合并
#include /*包含输入输出头文件*/ #define ListSize 100 typedef int DataType; typedef struct { DataType list[ListSize]; int length; }SeqList; void InitList(SeqList *L) /*将线性表初始化为空的线性表只需要把线性表的长度le...
分类:其他好文   时间:2015-07-07 23:01:08    阅读次数:229
顺序表
seqlist.h #ifndef __SEQLIST_H__ #define __SEQLIST_H__ #include #include #include #define MAX_SIZE 1000 typedef int DataType; typedef struct seqlist { DataType array[MAX_SIZE]; size_t size; }s...
分类:其他好文   时间:2015-07-01 22:18:48    阅读次数:168
动态链表
DynSeqlist.h #ifndef __DYNSEQLIST_H__ #define __DYNSEQLIST_H__ #include #include #include #include #define SIZE 5 typedef int DataType; typedef struct seqlist { DataType* array; size_t size; /...
分类:其他好文   时间:2015-07-01 22:16:21    阅读次数:156
队列的定义
队列:是一种特殊的线性表 队列仅在线性表的两端进行操作: 队头:取出数据元素的一端 队尾:插入数据元素的一端     队列性质:先进先出(FIFO)     队列的实现之顺序存储 代码复用线性表的顺序存储   #include "SeqList.h" #include "SeqQueue.h"   SeqQueue* SeqQueue_Create(int capac...
分类:其他好文   时间:2015-06-28 01:16:26    阅读次数:172
动态顺序表
seqlist.h#pragma once #define _SEQ_LIST_ #ifdef _SEQ_LIST_ #include #include #include#define DEFAULT_CAPACITY 3 typedef int DataType;typedef struct SeqList { DataTyp...
分类:其他好文   时间:2015-06-27 18:20:03    阅读次数:102
152条   上一页 1 ... 10 11 12 13 14 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!