Soal
00:00

25. Jump Game

SedangArrayAmazonMicrosoft

Each value is the maximum jump length from that position. Determine whether the last index is reachable.

Contoh 1:

Input: nums = [2,3,1,1,4]
Output: true

Contoh 2:

Input: nums = [3,2,1,0,4]
Output: false

Batasan:

  • 1 <= nums.length <= 10^4
Mode kode inti
● Tersimpan otomatisBaris 1, kolom 1