Missing Test Case - OJ and All Solutions Fail for this


  • -1
    A

    Let us say that we have a tint peak at the start:
    [1,2,3,1,100,200,300,400,500,600,700]

    The peak is 3. Most of the solutions seems to miss this case and incorrectly assumes that the peak exists in the 2nd half of the array and gives the answer as the last index.

    Do we have fool proof solution that covers this test case?


Log in to reply
 

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