- 博客(4)
- 收藏
- 关注
原创 有后序中序推导层序遍历
#include<iostream> #include<algorithm> using namespace std; #define maxn 40 int post[maxn], in[maxn]; struct Node { int val; int index; }node[maxn]; bool cmp(Node a, Node b) { retu...
2020-04-02 16:07:46 130
原创 7-9 Huffman Codes (30分)
typedef struct TreeNode* ElementType; typedef struct TreeNode* HuffmanTree; void AdjustDown(MinHeap H, int Parent); struct TreeNode { int Weight; ElementType Left, Right; }; struct HeapStruct { ...
2020-03-20 18:39:38 471
原创 由二叉树的前序中序推导后序 中序后序推导前序
由二叉树的前序中序推导后序 中序后序推导前序 #include<iostream> using namespace std; int pre[10] = {3, 7, 11,21,30,9,70}; int in[10] = {11, 7, 30, 21, 3, 9, 70}; int post[10] ={11, 30, 21, 7, 70, 9, 3}; //由先序中序推导后序 ...
2020-03-13 18:20:32 481
原创 hello C++
#include using namespace std; cout<<" Hello C++"<<endl; return 0;
2019-05-12 23:15:57 236
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人