data structure 期中复习答案.doc

  1. 1、本文档共4页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
data structure 期中复习答案

第  PAGE 4 页 共  NUMPAGES 4 页 第  PAGE 3 页 共  NUMPAGES 4 页 Midterm data structure review 1.Concepts explaining Data structure Time complexity Array implementation of list Linked list Queue Stack Binary tree Algorithm Depth of a tree (10)Height of a tree 2.Single choice (1) Which data structure is first in last out for data storage? ( B ) A. Queue B. Stack C. Character string D. Simple linear list (2) Which is dequeue time complexity in a queue as follows? ( A ) A. O(1) B. O(log2n) C. O(n) D. O(n2) (3) If a pushing sequence of a stack is 1,2,3…,100, and the output sequence is p1,p2,p3, …,pn and if p1=100, what p20 is then? ( C ) A. 40 B. 60 C. 81 D. uncertain (4) Which are the normal two storage structures of stack structure? ( A ) A Sequence storage structure and linked storage structure B Hash mode and index mode C Linked list storage structure and array D linear storage structure and nonlinear storage structure (5) The memory address of first element of a sequence queue is 200, the memory address of the second element is 204 and the length of every element is 4, what is the address of 6th element? ( B ) A.210 B. 220 C. 200 D. 230 (6) What is the condition to judge if a stack S (m elements at best) is empty? ( A ) A. S.top= =0 B. S.top= =-1 C. S.top!=m D. S.top= =m (7) What is the sameness between queue and stack? ( C ) A. First in first out all B. First in last out all C. Insertion and deletion only be done at the terminals D. No sameness at all (8) In a singly linked list, a given node by a pointer q pointing is a successor(后继) of the node that is pointed by p pointer, if inserting a node s into p and q, then ( D )need to be accomplished. A. s-next=q; p-next=s; B. p-next=s-next; s-next=p; C. q-next=s-next; s-next=p; D. p-next=s; s-next=q; (9) In a singly linked list, if a node that is a success

文档评论(0)

yan698698 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档