平衡树
你别教我打游戏
直面困难,重视过程,追求结果,淡忘过去。
展开
-
平衡搜索树(Binary Search Tree BST)、索引二叉搜索树
// // Created by SongyangJi on 2020/12/23. // #ifndef DATASTRUCTURE_BINARYSEARCHTREE_H #define DATASTRUCTURE_BINARYSEARCHTREE_H #include<iostream> using std::ostream; using std::endl; using std::cout; template<class K, class V> class Binar原创 2021-01-06 22:51:46 · 151 阅读 · 1 评论 -
AVL搜索树
依次插入: 20 10 5 30 40 3 4 25 23 27 50 // // Created by SongyangJi on 2020/11/16. // /** * * 这个例子仅仅演示了AVL的基本操作,没有用泛型,只有键,没有值, * 并且假定所有数据都不相同。 * */ #include <algorithm> using namespace std; #include <queue> #include <iostream> usi原创 2021-01-06 20:46:13 · 161 阅读 · 1 评论