Quiz: Running time of binary search

Compute how many steps a binary search would take to find an item in arrays of various sizes.

1

32 teams qualified for the 2014 World Cup. If the names of the teams were arranged in sorted order (an array), how many items in the array would binary search have to examine to find the location of a particular team in the array, in the worst case?

A)

At most 1

B)

At most 16

C)

At most 6

D)

At most 32

Question 1 of 50 attempted

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy