How this test case[2,5,0,0] return true?


  • 2
    P

    Can anyone please explain how [2,5,0,0] test case return true?
    index [0] has value 2 and if we jump 2 time from 0 index it will be value of 1st 0 and after that we cant jump further so if I am not wrong it should return false?

    Please help me with this test case.
    your answer will be appreciated.

    Thanks in advance.


  • 0
    A

    Same issue, can anyone answer.


  • 0
    V

    Yup. Same here. Initially I thought like this

    If you can't jump from starting index 0, see if you can jump from next index and so on...But that understanding is incorrect too for test case like

    [1, 0, 1, 1]


Log in to reply
 

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