non rotated test case ?!


  • 0
    C

    I get an error with the following test case: ([1,3], 1) which should output 0 since the integer 1 is present at index 0.
    My solution did not work for this one because I based it on the fact that the array will get rotate somewhere.

    I m thus wondering if you think this test case is valid ? or maybe the exercise should be change to say that the array may be rotated (but not necessarily is...) ?

    I will change my algo but i would like your feedback in case it was a real interview. what would you say ?
    Thx


Log in to reply
 

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