1345. Jump Game IV
Hard
Input: arr = [100,-23,-23,404,100,23,23,23,3,404]
Output: 3
Explanation: You need three jumps from index 0 --> 4 --> 3 --> 9. Note that index 9 is the last index of the array.Input: arr = [7]
Output: 0
Explanation: Start index is the last index. You do not need to jump.Last updated