University of Sydney_INFO1105_Data structure_2012 Semester 2
Review Test Submission: Quiz 3

Question 1
1 out of 1 points

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

Question 2
1 out of 1 points

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

Q?
Answer Selected Answer:
5

Correct Answer:
5

Question 3
1 out of 1 points

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

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

Correct Answer:

Question 4
0 out of 1 points

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
INFO1105_Data structure_2012 Semester 2_quiz4_1_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_quiz2_1_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_quiz1_1_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_quiz5_1_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_w06(1)_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_w03_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_w11(1)_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_t2_info1105_2012_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_w04_solution_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
INFO1105_Data structure_2012 Semester 2_w06_solution_电脑基础知识_IT/计算机_专业资料。University of Sydney_INFO1105_Data structure_2012 Semester 2...
热门文档