![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
firefox-w
c语言,c++, linux操作系统,数据结构,计算机网络
展开
-
堆排序
#include #include using namespace std; template class Heap { public: Heap() {} Heap(const T* array, size_t size){ for (size_t i = 0; i < size; i++){ _array.push_back(array[i]); for (int原创 2017-05-22 16:10:12 · 387 阅读 · 0 评论 -
二叉树的递归与非递归
#include #include #include #include using namespace std; template struct BinaryTreeNode { BinaryTreeNode* _left; BinaryTreeNode* _right; T _data; BinaryTreeNode(const T& x) :_left(NULL) ,原创 2017-05-06 17:44:20 · 446 阅读 · 0 评论 -
文件压缩
//HuffmanTree.h #include #include #include "Heap.h" using namespace std; template struct HuffmanNode { HuffmanNode* _parent; HuffmanNode* _left; HuffmanNode* _right; T _weight; HuffmanNod原创 2017-08-14 16:43:38 · 356 阅读 · 0 评论