中国大学MOOC: 下面给出了霍夫曼编码问题的算法的伪代码,其中空白处应分别填入___ 输入:各字符频数http://edu-image.nosdn.127.net/_PhotoUploadUtils_b9f85b67-d6e2-439f-8365-6f2bb22a0ceb.png,字符数http://edu-image.nosdn.127.net/_PhotoUploadUtils_e35a832b-8bcc-4751-b43a-42abf1120256.png 输出:霍夫曼编码树//预处理将http://edu-image.nosdn.127.net/_PhotoUploadUtils_07a45d86-96fe-4806-9ca0-abd0edab1db5.png递增排序新建结点数组http://edu-image.nosdn.127.net/_PhotoUploadUtils_043bbf58-73d6-4789-992f-d3c5ee3b20b1.pngfor http://edu-image.nosdn.127.net/_PhotoUploadUtils_ad24654a-d306-4e05-8fce-c9e96e537312.png do http://edu-image.nosdn.127.net/_PhotoUploadUtils_db5be2f0-4bdb-426e-8032-aea2ac068bdb.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_e38908ef-0597-48b4-b575-4381839ce440.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_3b7b6925-0c80-46ab-80c1-8b2d328f9ba0.pngendhttp://edu-image.nosdn.127.net/_PhotoUploadUtils_e785bce9-af5a-4b54-8890-4ad70a5585af.pngfor http://edu-image.nosdn.127.net/_PhotoUploadUtils_4479436e-bfe2-4dce-a3d0-8e42044d9d2c.png do 新建结点http://edu-image.nosdn.127.net/_PhotoUploadUtils_97c23975-0b60-42c7-9a0a-cc059efc4615.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_c00038d5-3c25-4965-93fa-bd2db198c1f8.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_30842c3a-839a-4b9a-8fc9-5196655dc25b.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_5aa683ee-d23d-4db5-b0cb-bb4805e6ca90.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_908a0db0-e465-44cd-9bf3-c4a7ac9e552c.png http://edu-image.nosdn.127.net/_PhotoUploadUtils_dd0e0c1e-a285-4a20-abc6-256d3577f602.png endreturn http://edu-image.nosdn.127.net/_PhotoUploadUtils_5e644e79-2444-499b-9dfd-c0ee3ab22cb2.png
举一反三
- 写一个文法G,使其语言为不以0开头的偶数集。 A: G[S]:S→AB|BA→AD|CB→2|4|6|8|0C→1|3|5||7|9|B B: G[S]:S→AB|BA→AD|CB→1|2|3|4|5|6|7|8|9C→2|4|6|8|0 C: G[S]:S→AB|BA→AD|CB→2|4|6|8|0C→1|2|3|4|5|6|7|8|9D→0|C D: G[S]:S→AB|BA→AD|DB→2|4|6|8|0D→1|2|3|4|5|6|7|8|9|0
- 常用的国际域名()? A: COM,.ORG B: ORG,.NET C: NET,.EDU D: EDU,.INT
- >>>x= [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9]>>>print(x.sort()) 语句运行结果正确的是( )。 A: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] B: [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9] C: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] D: ['2', '4', '0', '6', '10', '7', '8', '3', '9', '1', '5']
- 【计算题】5 ×8= 6×4= 7×7= 9×5= 2×3= 9 ×2= 8×9= 7×8= 5×5= 4×3= 5+8= 6 ×6= 3×7= 4×8= 9×3= 1 ×2= 9×9= 6×8= 8×0= 4×7=
- 用A表示(0|1|2|3|4|5|6|7|8|9|a|b|c|d|e|f|A|B|C|D|E|F),用B表示(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F),则描述c语言十六进制整数的正规式是:( )。 A: (-|ε)(0x|0X)BB* B: (-|ε)AA* C: (-|ε)(0x|0X)AA* D: (0x|0X)BB*