![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
堆
yeternity
这个作者很懒,什么都没留下…
展开
-
05-树9 Huffman Codes (30分)
In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history of computer science. As a professor who gives the f原创 2017-05-27 13:43:54 · 930 阅读 · 0 评论 -
05-树7 堆中的路径 (25分)
将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。 输入格式: 每组测试第1行包含2个正整数NNN和MMM(≤1000\le 1000≤1000),分别是插入元素的个数、以及需要打印的路径条数。下一行给出区间[-10000, 10000]内的NNN个要被插入一个初始为空的小顶堆的整数。最后一行给出MMM个下标。 输出格式: 对输入原创 2017-05-30 15:18:10 · 598 阅读 · 0 评论