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 final exam problem on Huffman codes, I am encountering a big problem: the Huffman codes are NOT unique. For example, given a string "aaaxuaxz", we can observe that the frequencies of the characters 'a', 'x', 'u' and 'z' are 4, 2, 1 and 1, respectively. We may either encode the symbols as {'a'=0, 'x'=10, 'u'=110, 'z'=111}, or in another way as {'a'=1, 'x'=01, 'u'=001, 'z'=000}, both compress the string into 14 bits. Another set of code can be given as {'a'=0, 'x'=11, 'u'=100, 'z'=101}, but {'a'=0, 'x'=01, 'u'=011, 'z'=001} is NOT correct since "aaaxuaxz" and "aazuaxax" can both be decoded from the code 00001011001001. The students are submitting all kinds of codes, and I need a computer program to help me determine which ones are correct and which ones are not.
1
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property. Figures 1-4 illustrate the rotation rules.Now given a sequence of insertions, you are supposed to tell the root of the resulting AVL tree.
2021-11-10 18:59:06 5KB 陈越 数据结构 AVLTree 平衡二叉树
1
很精华的数据结构,我大学老师给我的
2021-09-29 23:35:58 4.22MB 数据结构
1
浙江大学陈越老师数据结构课件
2021-03-24 18:06:21 5.59MB PPT 课件
1
中国大学MOOC浙江大学数据结构课程(陈越)____数据结构作业(内含所有作业)
2020-11-28 15:46:35 1.11MB 课程作业
1
中国大学MOOC浙江大学数据结构课程(陈越)____数据结构作业(内含所有作业)
2020-01-03 11:31:47 1.18MB 课程作业
1
有了这个课件结合: https://www.bilibili.com/video/av20788728/?p=10 视频进行学习,事半功倍
1
“数据结构”在计算机科学中是一门综合性的专业基础课,数据结构是介于数学、计算机硬件和计算机软件三者之间的一门核心课程。数据结构这一门课的内容不仅是一般程序设计(特别是非数值性程序设计)的基础,而且是设计和实现编译程序、操作系统、数据库系统及其他系统程序的重要基础。
2019-12-21 20:21:53 6.43MB 数据结构
1