码迷,mamicode.com
首页 >  
搜索关键字:seqlist    ( 152个结果
c++实现数据结构1.顺序表
头文件seqlist.h #ifndef _SEQLIST_H_ #define _SEQLIST_H_ #include<iostream> using namespace std; template <class Type> class seqlist { public: seqlist() { ...
分类:编程语言   时间:2017-05-30 15:45:22    阅读次数:169
C++:顺序表类实现约瑟夫问题_密码不同
//.h #pragma once#include <iostream>using namespace std;#define MAXSIZE 100 template <class T>class SeqList{T data[MAXSIZE];int length;public:SeqList( ...
分类:编程语言   时间:2017-05-17 20:55:21    阅读次数:191
顺序表的有关增强练习
/* Name: SeqList_Rel Copyright: Author: huowolf Date: 06/07/15 21:49 Description: 顺序表的有关增强练习 */ #include <iostream> using namespace std; #define MAXSI ...
分类:其他好文   时间:2017-05-01 13:41:36    阅读次数:101
折半查找
本博客不再更新,很多其它精彩内容请訪问我的独立博客 1.折半查找的非递归算法 int BinarySearch(SeqList &L,DataType x) { int high=L.n-1,low=0,mid; while(low<=high){ mid=(low+high)/2; if(x.ke ...
分类:其他好文   时间:2017-04-23 10:50:45    阅读次数:142
动态链表增删改查及排序功能
主要功能的实现: #include "SeqList.h" void InitSeqList(SeqList * pSeq)//初始化 { assert(pSeq); pSeq->array = (DataType*)malloc(sizeof(DataType)*DEFAULT_CAPICITY) ...
分类:编程语言   时间:2017-04-21 09:37:26    阅读次数:216
线性表之顺序表实现
1 #ifndef __SEQ_LIST_H__ 2 #define __SEQ_LIST_H__ 3 4 #include 5 #include 6 #include 7 8 9 #define SEQLIST_INIT_SIZE 8 //顺序表初始化大小 10 #define INCSIZE 3... ...
分类:其他好文   时间:2017-04-07 00:47:08    阅读次数:146
线性表之顺序表C++实现
线性表之顺序表 一、头文件:SeqList.h //顺序线性表的头文件#include<iostream> const int MaxSize = 100;//定义顺序表SeqList的模板类template<class DataType>class SeqList{public: //顺序表无参构 ...
分类:编程语言   时间:2017-04-02 20:01:37    阅读次数:268
多项式相加(顺序表)
#include typedef struct { int coef; int index; }datatype ; typedef struct { datatype *elem; int length; }SeqList; void BuildPoly(SeqList &s) { s.elem=... ...
分类:其他好文   时间:2017-03-13 16:19:35    阅读次数:180
顺序表(SeqList)
恢复内容开始 数据结构在上周结课,接下来就是为期几周的上机实验,说是实验课我感觉还不如不上。几乎每个人都是按着老师的要求把书上的代码打一遍,变都不变。一遍以后连自己打的什么都不知道。 与其说是实验课,我感觉不如叫它打字练习课。 老师做的并没错,错的是学生对于这节课的态度,老师已经把该讲的讲过了,而上 ...
分类:其他好文   时间:2016-12-16 22:01:03    阅读次数:251
线索化二叉树实例
1.#include <stdio.h>#include <stdlib.h>#include "BTree.h"#include "SeqList.h"/* 线索二叉树 */struct Node{ BTreeNode header; char v;};void printf_data(BTree ...
分类:其他好文   时间:2016-12-10 18:44:54    阅读次数:170
152条   上一页 1 2 3 4 5 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!