← AP CSP

Searching: AP CSP practice

Linear and binary search. 3 questions in the style of the AP CSP exam.

Sample questions

Which condition must be true before a binary search can be used on a list?

  1. The list must be sorted
  2. The list must have an even number of elements
  3. The list must contain no duplicates
  4. The list must contain only numbers