Sherwood算法消除最坏实例,以达到对任何实例都能有好的性能的效果
文件:
rd_list.c --> create a random sequence of n integers not equal to each other
list.c --> create a descending sequence of n integers not equal to each other
sherwood.c --> 就是该算法,静态链表的长度默认设为1000,可在宏定义处修改
...
设计一个智力竞赛抢答器,可同时供8名选手或8个代表队参加比赛,他们的编号分别是0、1、2、3、4、5、6、7,各用一个抢答按钮,按钮的编号与选手的编号相对应,分别是So、S1、S2、S3、S4、S5、S6、S7。
② 给节目主持人设置一个控制开关,用来控制系统的清零(编号显示数码管灭灯)和抢答的开始。
③ 抢答器具有数据锁存和显示 ...
I ve written some many years ago dynamic Huffman algorithm to compress and decompress data. It is mainly targeted to data with some symbols occuring more often than the rest (e.g. having some data file consisted of 3 different symbols and their total number of occurence in that file s1(1000), s2(200 ...