数据结构/算法
feng_ye2015
加油
展开
-
c++实现循环链表
cyclelist.h #pragma once #include <iostream> using namespace std; class Node { public: Node() {} Node(int e, Node* p = nullptr) : data(e), next(p) {} ~Node() {} public: int data; Node* ...原创 2019-04-10 17:11:04 · 1994 阅读 · 0 评论 -
c++实现静态链表
StaticList.h #pragma once const int MAXSIZE = 20; class Node { public: long data; int cursor; //指向下一个元素的游标位置 }; class StaticList { public: StaticList(); ~StaticList(); bool isEmpty(); void ...原创 2019-04-07 18:57:52 · 650 阅读 · 0 评论 -
c++实现单链表
SingleList.h #pragma once class Node { public: Node() {} Node(int info, Node* p) : data(info), next(p) {} ~Node() {} int data; Node* next; }; class SingleList { public: SingleList(); ~Sin...原创 2019-04-03 15:33:01 · 160 阅读 · 0 评论