数据结构guide(有答案).doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Describe an algorithm Code an algorithm Analyze the time complexity of your algorithm Familiar with the operations of BST and AVL trees The answer or solution should begin with “Answer:”/“Ans:”/“Solution:”/“Sol:” Sample questions Part 1 A non-circular doubly linked list can best and most generally be defined as a linear sequence of elements chained together with pointers a linear sequence of elements in sequential memory locations a set of elements chained together with pointers a set of elements in sequential memory locations 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 a and c Which of these is the correct big-O expression for 1+2+3+...+n? O(log n) O(n) O(n log n) O(n2) Here is some code for an integer variable n: while (n 0) { n = n/10; // Use integer division } What is the worst-case time analysis for the above loop? O(1) O(log n) O(n) O(n2) Consider the following statements: int i = 42; int j = 80; int *p1; int *p2; p1 = i; p2 = j; *p1 = *p2; cout i j endl; What numbers are printed by the output statement? 42 and then another 42 42 and then 80 80 and then 42 80 and then another 80 What kind of list is best to answer questions such as What is the item at position n? Lists implemented with an array. Doubly-linked lists. Singly-linked lists. Doubly-linked or singly-linked lists are equally best Suppose we have an array implementation of the stack class, with ten items in the stack stored at data[0] through data[9]. Where does the push member function place the new entry in the array? data[0] data[1] data[9] data[10] Is it possible for a member function of a class to access another member function of the same class? No. Yes, but only public member functions. Yes, but only private member functions. Yes, both public and private member functions can be accessed withi

文档评论(0)

勤能补拙 + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档