黄色一级啪啪,国产精品亚洲精品青青青,日本高清在线观看视频你懂的,亚洲色图综合区,国产一区二区三区免费观看在线,2016天天干天天插天天操,无码理论在线视频

首頁>苗木百科>給定權值(5,10,12,15,30,40),構造相應的哈夫曼樹.要求寫出構造步驟

給定權值(5,10,12,15,30,40),構造相應的哈夫曼樹.要求寫出構造步驟

來源:www.petajastudio.com   時間:2022-01-20 15:17   點擊:6127   編輯:niming   手機版

按權值大小排列后 5,10,12,15,30,40
只要按照將最小的兩個合并, 合并后的值再入列中(最小的兩個出列), 至到列中只有一個值.
得到序列5+10=15, (12,15,15,30,40)
[5]`````[10]
\`````/
\```/`
\`/
` `(15)`
從(12,15,15,30,40)找兩個最小的12+15=27
[5]`````[10]````````[12]``````[15]
``\`````/`````````````\``````/
` `\```/` ``````````` `\````/`
````\`/`````````````````\``/
````(15)````` ````````(27)`
依次從新的序列中取2個想加和最小的。
(15,27,30,40)-----取15+27=42;
(30,40,42)---------取30+40=70;
(42,70)-------------取42+70=112;
(112)就剩一個終止。

[5]`````[10]`[12]``````[15]
``\`````/``````\``````/
`0`\```/`1`````0\````/`1
````\`/``````````\``/
````(15)````` (27)``[30]`````[40]
``````\`````` /`````````\``````/
`````0`\```` /`1````````0\````/`1
````````\`` /`````````````\``/
```````` (42)````````````` (70)``````
```````````\`````` ````````````/
``````````0`\``````` ```````/
`````````````\ ```````````/
`````````````(46)``````````1/`
````````````````\``````````/``
```````````````0`\````````/``
``````````````````\``````/``
````````````````````(112)

圖真不好畫,詳細可以參考

感覺不錯,贊哦! (0)
下次努力,加油! (0)
網(wǎng)友評論僅供其表達個人看法,并不表明本站立場。
評論
    共 0 條評論
本站所發(fā)布的全部內容源于互聯(lián)網(wǎng)搬運,僅限于小范圍內傳播學習和文獻參考,請在下載后24小時內刪除!
如果有侵權之處請第—時間聯(lián)系我們刪除。敬請諒解!qq:2850716282@qq.com
山茶油 滇ICP備2021006107號-532
關于本站 聯(lián)系我們 特別鳴謝