AP Computer Science Principles Quiz
14 questions · no time limit
0:00
ALGORITHMS AND PROGRAMMING
Question 1 of 14
No time limit
Current
Answered
Flagged
Not seen
A student uses iterative binary search on sorted array [5, 8, 12, 17, 21, 26, 30, 34, 41, 49, 55, 63, 70, 81] to find target 34; midpoint is ⌊(low+high)/2⌋. Steps: low=0, high=13, mid=6 (30)<34 so low=7; next mid=⌊(7+13)/2⌋=10 (55)>34 so high=9; next mid=⌊(7+9)/2⌋=8 (41)>34 so high=7; next mid=⌊(7+7)/2⌋=7 (34) found. Refer to the array provided above. How many iterations are required to locate the target element using binary search?
YOUR PROGRESS
14
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end