![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构、c++
城北徐公丶
这个作者很懒,什么都没留下…
展开
-
单链表的实现 C++
//struct node//{// datatype info;// node *next;// node() :next(NULL) {}// node(datatype x) :info(x), next(NULL) {}//};class node //结点类{public: node(); node(datatype x) { info = x; next原创 2017-12-20 12:27:59 · 183 阅读 · 0 评论 -
排序二叉树的c++实现
class tree{public: tree(); ~tree(); datatype info; tree *lchild; tree *rchild;private:};tree::tree(){ rchild = NULL; lchild = NULL;}tree::~tree(){}class treelink{public: treeli原创 2017-12-20 12:34:56 · 1371 阅读 · 0 评论 -
邻接表的c++实现 及 Dijkstra算法
邻接表的c++#define maxSize 5#define INFINITY 10000 //代表无穷typedef char Vertex;//节点类型typedef int edge;//边上权值类型 //边节点class edgeNode{public: edgeNode(); ~edgeNode(); int adjvex; edge weigh原创 2017-12-20 12:40:53 · 1998 阅读 · 0 评论 -
c++ 快速排序
设置标兵,将小于和大于标兵的数分别放在标兵两侧。进行递归。void quickSort(Student s[], int low, int high){ Student temp; temp = s[low]; if (low < high) { int i = low, j = high; while (i < j) { while (i < ...原创 2017-12-20 12:52:46 · 173 阅读 · 0 评论