数据结构
文章平均质量分 87
liuchenjane
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
单链表总结
#include <iostream> #include <vector> #include <string> using namespace std; void print(int a[], int n) { for (int i = 0; i < n; i++) cout << a[i] << " "; cout << endl; } //直接插入排序 void原创 2017-04-28 16:36:30 · 693 阅读 · 0 评论 -
双向链表的基本操作
双向链表的建立,打印,查找,增删#include <iostream> #include <vector> #include <algorithm> #include <string> #include <climits> using namespace std; //以下是关于双链表的操作 struct dnode { int data; dnode* left; dnod原创 2017-05-11 17:24:10 · 381 阅读 · 0 评论 -
二叉搜索树BST的C++实现
BST 包含的功能:插入,删除,查找,查找某一结点的后续和前驱,中序遍历和前序遍历 这里,用于实验的二叉树: //二叉搜索树BST #include #include using namespace std; class TreeNode{ public: int key; TreeNode* left; TreeNode* right; TreeNode* p;//原创 2016-11-05 17:58:27 · 6559 阅读 · 0 评论 -
AVL树的插入操作
AVL tree (Adelson-Velskii-Landis tree) 一颗AVL树是其每个节点的左子树和右子树的高度最多差1的二叉查找树。加了额外的平衡条件是为了确保整棵树的深度为O(logN) 在高度为h的AVL树,最少节点数S(h)=S(h-1)+S(h-2)+1. =========================================================原创 2017-05-20 20:58:28 · 1685 阅读 · 0 评论
分享