Light Mode
Dark Mode
Second example is misleading

In this example: - array = [1, 2, 3] and N = 3, but N is greater than the length of the array, so the result is -1.

N (3) is not greater than the length of the array (3) , but greater than the highest index of the array (2).

Created: Oct. 12, 2014, 7:12 a.m.
Updated: Oct. 12, 2014, 10:07 a.m.
1
4
User avatar
ShaileshHegde