![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
坚持到底cw
奋斗青年
展开
-
链表c++实现
#include // #define NULL 0class Node //节点类{public: Node(){} Node(int n){ num=n; next=NULL; } Node(int n, Node *p){ num=n; next=p;} void setNum(int n) {num =n;} void setNext(Nod原创 2014-02-22 15:35:00 · 523 阅读 · 0 评论 -
栈c++实现
#includeusing namespace std;class Stack{public:Stack(){top = -1;}void push(int n){if(!isfull())data[++top] = n;elsecout}void pop(){if(!isempty()){couttop--;}els原创 2014-02-22 15:39:50 · 454 阅读 · 0 评论 -
队列c++实现
#include#includeusing namespace std;#define size 10class Queue{public:Queue();void ruQueue(int n);void chuQueue();void show();private:int front;int end;int number原创 2014-02-22 20:35:40 · 594 阅读 · 0 评论