Binary Search
AP Computer Science Principles · Flashcards
AP COMPUTER SCIENCE PRINCIPLES · FLASHCARDS
Card 1
of 40
0 got it
0 to review
Current
Got it
Still learning
Not seen
QUESTION
How does binary search improve efficiency compared to linear search?
QUESTION
What kind of search is binary search considered?
QUESTION
Determine the middle index for 'low' = 2, 'high' = 6.
Tap to flip before you grade
ANSWER
Middle index = 4. Using the formula
(
2
+
6
)
/
2
=
4
(2 + 6) / 2 = 4
(
2
+
6
)
/2
=
4
.
Swipe → got it · swipe ← still learning
Got it
Still learning
Flip Card
Previous card
Next card