随笔分类 -  数据结构

摘要:第一次接触树,各种递归搞得眼花,总算是按书上的代码,敲了下来,记录一下 /** * Created by admin on 2021/10/27. * 搜索二叉树实现 */ #ifndef HELLOWORLD_BINARY_SEARCH_TREE_H #define HELLOWORLD_BINA 阅读全文
posted @ 2021-10-28 09:54 MicroDeLe 阅读(97) 评论(0) 推荐(0)
摘要:// // Created by admin on 2021/10/21. // List 双向链表实现 // #ifndef HELLOWORLD_LIST_H #define HELLOWORLD_LIST_H // List类 template<typename Object> class L 阅读全文
posted @ 2021-10-21 20:40 MicroDeLe 阅读(96) 评论(0) 推荐(0)
摘要:// 自定义vector类型 template <typename Object> class Vector{ int mSize; // vector元素数量 int capacity; // vector容量 Object *object; // vector首指针, 除非扩大容量, 首指针不允 阅读全文
posted @ 2021-10-20 22:23 MicroDeLe 阅读(122) 评论(0) 推荐(0)
摘要:话不多说,直接上代码,看注释 #include <iostream> #include <cstring> using namespace std; // 可变数组实现 template<class T> class Array { template<class E> friend ostream& 阅读全文
posted @ 2021-10-03 15:44 MicroDeLe 阅读(925) 评论(0) 推荐(0)