- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
数据结构例题解析
I Single Choice(10 points)
1. ( a )For the following program fragment the running time(Big-Oh) is .
i = 0;
s = 0;
while(s ( 5*n*n + 2))
{ i++;
s = s + i;
}
a. O(n) b. O(n2) c. O(n1/2) d. O(n3)
2. ( c )Which is non-linear data structure_____.
a. queue b.stack c. tree d. sequence list
3.( b )The worst-time for removing an element from a sequence list (Big-Oh) is .
a. O(1) b. O(n) c. O(n2) d. O(n3)
4.( d )In a circular queue we can distinguish(区分) empty queues from full queues by .
a. using a gap in the array
b. incrementing queue positions by 2 instead of 1
c.keeping a count of the number of elements
d. a and c
( b )A recursive function can cause an infinite sequence of function calls if .
the problem size is halved at each step
the termination condition is missing
no useful incremental computation is done in each step
the problem size is positive
6.( c )The full binary tree with height 4 has nodes.
a. 15 b. 16 c.31 d.32
7. ( b )Searching in an unsorted list can be made faster by using .
binary search
a sentinel(哨兵) at the end of the list
linked list to store the elements
a and c
8.( )Suppose there are 3 edges in an undirected graph G, If we represent graph G with a adjacency matrix, How many “1”s are there in the matrix?
a. 3 b. 6 c. 1 d. 9
9. ( ) Construct a Huffman tree by four leaf whose weights are 9, 2, 5, 7 respectively. The weighted path length is___________.
a. 29 b. 37 c. 46 d.44
10. Consider the following weighted graph.
Consider Dijkstra’s algorithm on this graph to find the shortest paths with s as a starting vertex. Which are the first four vertices extracted from the priority queue by the algorithm (listed in the order they are extracted) ?
a. s, y, t, x b. s, y,
您可能关注的文档
最近下载
- 企业吸收合并协议.doc VIP
- 板框压滤机操作规程.doc VIP
- 义务教育版七年级全一册信息科技 第9课 数据传输有新意 教案(表格式).pdf VIP
- 爬山虎的脚PPT课件.pptx
- 康复辅助技术咨询师.pdf VIP
- 北京工业大学822信号与系统2022年真题及答案.pdf VIP
- 全国黄金交易从业水平考试《黄金市场基础知识与交易实务》复习全书【核心讲义+章节练习】.docx VIP
- 电饭煲UL认证零部件检验要求.pdf VIP
- 浙江省桐乡市2025年上半年公开招聘辅警试题含答案分析.docx VIP
- GB30871危险化学品企业位特殊作业安全规范知识考试复习题库(含答案).docx VIP
文档评论(0)