文件名称:pro
介绍说明--下载内容均来自于网络,请自行研究使用
如果采用单链表保存单词,可采用如下办法压缩存储空间。如果两个单词的后缀相同,则可以用同一个存储空间保存相同的后缀。例如,原来分别采用单链表保存的单词Str1“abcdef”和单词Str2“dbdef”,经过压缩后的存储形式如下。
请设计一个高效的算法完成两个单链表的压缩存储,并估计你所设计算法的时间复杂度。
要求:阅读预设代码,编写函数SNODE * ziplist( SNODE * head1, SNODE * head2 )
ziplist的功能是:在两个串链表中,查找公共后缀,若有公共后缀,则压缩 并返回指向公共后缀的指针;否则返回NU-If you save a single word list, compression methods can be used as storage space. If the suffix of the same two words, you can use the same storage space to save the same suffix. For example, the original list were used to save a single word Str1 "abcdef" and the word Str2 "dbdef", the compressed storage in the form below.
Please complete the design of an efficient algorithm for two single linked list of compressed storage, and estimate the time you design algorithm complexity.
Requirements: Read the default code, write a function SNODE* ziplist (SNODE* head1, SNODE* head2)
ziplist features are: two strings in the list, find the common suffix, if common suffix, the suffix compression and returns a pointer pointing to the public or NULL
请设计一个高效的算法完成两个单链表的压缩存储,并估计你所设计算法的时间复杂度。
要求:阅读预设代码,编写函数SNODE * ziplist( SNODE * head1, SNODE * head2 )
ziplist的功能是:在两个串链表中,查找公共后缀,若有公共后缀,则压缩 并返回指向公共后缀的指针;否则返回NU-If you save a single word list, compression methods can be used as storage space. If the suffix of the same two words, you can use the same storage space to save the same suffix. For example, the original list were used to save a single word Str1 "abcdef" and the word Str2 "dbdef", the compressed storage in the form below.
Please complete the design of an efficient algorithm for two single linked list of compressed storage, and estimate the time you design algorithm complexity.
Requirements: Read the default code, write a function SNODE* ziplist (SNODE* head1, SNODE* head2)
ziplist features are: two strings in the list, find the common suffix, if common suffix, the suffix compression and returns a pointer pointing to the public or NULL
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pro.doc