Skip to content
RED SAGSkills
medium10 pts · first answer countssorting-and-searching

Finding a peak with binary search

To find any peak (an item larger than both neighbours) in an unsorted array, a binary search compares a[mid] with a[mid + 1]. If a[mid] < a[mid + 1], what does it do?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions