data structure & algorithm
SpursCLOUD
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
graph.h
#ifndef GRAPH_H#define GRAPH_H#include #include using namespace std;const int UNVISITED = 0;const int VISITED = 1;class Edge {public: int from; //edge start point int to; //edge end p原创 2015-07-26 19:40:00 · 1672 阅读 · 0 评论 -
graphm.h
/* 1. 二维数组存储边的权值, 权为零表示边不存在 */#ifndef GRAPHM_H#define GRAPHM_H#include #include "graph.h"using namespace std;class Graphm : public Graph {private: int **matrix;public: Graphm(int numVe原创 2015-07-26 19:42:09 · 433 阅读 · 0 评论 -
graphl.h
#ifndef GRAPHL_H#define GRAPHl_H#include #include "graph.h"using namespace std;// node data elementstruct listUnit { int vertex; // 顶点 int weight; // 边的权};// linked li原创 2015-07-26 19:44:18 · 534 阅读 · 0 评论 -
arrlist
/* 1. 插入删除等位置参数指数组下标 * 2. 判断条件有:表是否已满; 位置是否合法 */#ifndef LIST_H#define LIST_H#include using namespace std;template class arrList {private: T* aList; int maxSize; int curLen; int positio原创 2015-07-22 21:59:42 · 588 阅读 · 0 评论 -
lnklist
/* 1. head->next第一个元素, 位置为0 * 2. setPos(-1) return head * 3. 删除和插入先定位到前一个结点 * 4. 尾结点为临界情况,需要特殊处理 */#ifndef LNKLIST_H#define LNKLIST_H#include using namespace std;templateclass Node {publ原创 2015-07-22 21:55:05 · 413 阅读 · 0 评论
分享