文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 电脑基础知识 > INFO1105_Data structure_2012 Semester 2_quiz3_1
侵权投诉

INFO1105_Data structure_2012 Semester 2_quiz3_1

University of Sydney_INFO1105_Data structure_2012 Semester 2

Review Test Submission: Quiz 3

INFO1105_Data structure_2012 Semester 2_quiz3_1

Question 1

1 out of 1 points

INFO1105_Data structure_2012 Semester 2_quiz3_1

Given the following function R, what is returned by R(4)?

public static int R(int n) { if (n <= 1) { return 2; } if (n % 2 == 0) { return R(n-1)+2; } else { return 2*R(n- 2); } }

[Blank1]

Specified Answer for: Blank1 Correct Answers for: Blank1

6 6

INFO1105_Data structure_2012 Semester 2_quiz3_1

Question 2

1 out of 1 points

INFO1105_Data structure_2012 Semester 2_quiz3_1

An initially empty queue Q has performed a total of 15 enqueue operations, 10 front operations, and 15 dequeue operations, 5 of which generated

EmptyQueueExceptions, which were caught and ignored. What is the current size of

INFO1105_Data structure_2012 Semester 2_quiz3_1

Q?

Answer Selected Answer:

5

INFO1105_Data structure_2012 Semester 2_quiz3_1

Correct Answer:

5

INFO1105_Data structure_2012 Semester 2_quiz3_1

Question 3

1 out of 1 points

INFO1105_Data structure_2012 Semester 2_quiz3_1

An initially empty queue Q has performed a total of 10 enqueue operations, 10 front

INFO1105_Data structure_2012 Semester 2_quiz3_1

operations, and 10 dequeue operations. What is the current size of Q?

Answer

Selected Answer:

INFO1105_Data structure_2012 Semester 2_quiz3_1

Correct Answer:

INFO1105_Data structure_2012 Semester 2_quiz3_1

Question 4

0 out of 1 points

INFO1105_Data structure_2012 Semester 2_quiz3_1

Consider a full binary tree implemented using the array as discussed in the lectures. For the tree show below, assume that the root of the tree is stored

第1页

你可能喜欢

热门文档

相关文档

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email