| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
easy Solved by 2 students
Merge Method Boundary Error
< Prev
Next >

The following merge method contains a logical error in the calculation of the temporary subarray sizes. Which of the following statements correctly identifies the error?

A

The left subarray should start copying from index 1, not low.

B

The size of the right subarray should be ‘high - mid’ instead of ‘high - mid + 1’.

C

The size of the left subarray should be ‘mid - low + 1’ instead of ‘mid - low’.

D

The variable ‘k’ should be initialized to mid rather than low.

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1solsaloe01 0m 00s -10
#2jeonsaw172323 31m 39s -1,709
#3lsj0803092211 31m 42s -1,802
Items per page:
10
1 – 3 of 3
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy