Skip to content
RED SAG Skills
easy5 pts · first answer countsarraysbinary-search

Steps to find a value by binary search

You binary search for 7 in [1, 3, 5, 7, 9] with lo = 0, hi = 4 and mid = floor((lo + hi) / 2). How many elements are compared before 7 is found?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions