Should the peak be defined as "greater than or equal to" for binary search work?

  • 0

    the problem should define "peak" as greater than or equal to its neighbors or give the constraint that all numbers are unique, so that the popular binary search will work.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.