文件名称:pro
-
所属分类:
- 标签属性:
- 上传时间:2012-10-26
-
文件大小:2.58kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
如果采用单链表保存单词,可采用如下办法压缩存储空间。如果两个单词的后缀相同,则可以用同一个存储空间保存相同的后缀。例如,原来分别采用单链表保存的单词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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.