![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Data Struct
ZhongQi0808
菜鸟码农
展开
-
C++ 数据结构 双链表(模板类)
#ifndef DLIST_H_INCLUDED#define DLIST_H_INCLUDED#includeusing namespace std;templateclass DList;templateclass ListNode{ friend class DList;public: ListNode():data(Type()),next(NULL原创 2015-05-31 17:11:02 · 1041 阅读 · 0 评论 -
C++数据结构 顺序表的实现(模板类的实现)
利用模板类实现顺序表的操作实现的功能: 1.尾插,2.头插,3.显示,4.尾删,5.头删,6.按位置,7.插按值插,8.按位置删,9.按值删,10.按值查,11.求表长,12.清除数据,13.摧毁该顺序表,14.反转,15.排序(冒泡排序,快速排序)。头文件源代码:#pragma once // 防止重复编译#includeusing namespace std原创 2015-05-24 15:12:59 · 8394 阅读 · 1 评论 -
C++数据结构 单链表(模板类)
利用模板类实现单链表及其功能需要实现的操作:[1] push_back [2] push_front [3] show_list [0] quit_system[4] pop_back [5] pop_front [6] insert_val [7] delete_val [8] find [9]len原创 2015-05-24 16:09:35 · 2150 阅读 · 0 评论 -
数据结构 二叉树大部分操作的实现
#ifndef BINTREE_H_INCLUDED#define BINTREE_H_INCLUDED#include #include #include #include using namespace std;templateclass BinTree;templateclass BinTreeNode{public: friend class BinT原创 2015-06-19 13:14:01 · 1518 阅读 · 0 评论 -
数据结构 表达式求值
实现表达式求值,以及表达式中括号是否匹配。实现方法,建立两个栈,一个用来存放操作数,一个用来存放运算符。判断运算符优先级来确定什么时候出栈,利用一个数组去表示优先级头文件代码如下:#ifndef STACK_H_INCLUDED#define STACK_H_INCLUDED#include #include using namespace std;templatec原创 2015-08-05 20:13:47 · 2787 阅读 · 1 评论