摘要: #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; // 判断是否同一棵二叉搜索树 /* 求解思路: 1. 搜索树表示 2. 建搜索树T 3. 判别一序列是否与搜索树一致 */ // 搜索树表示 typedef struct TreeNode *Tree; struct TreeNode { i 阅读全文
posted @ 2019-09-16 21:20 青衫客36 阅读(174) 评论(0) 推荐(0) 编辑
摘要: // 最大堆的操作 // 最大堆的创建 typedef struct HeapStruct *MaxHeap; struct HeapStruct { ElementType *Elements; // 存储堆元素的数组 int Size; // 堆的当前元素个数 int Capacity; // 堆的最大容量 }; MaxHeap Create(int MaxSize) { /... 阅读全文
posted @ 2019-09-16 21:20 青衫客36 阅读(128) 评论(0) 推荐(0) 编辑