題庫
00:00

25. Jump Game

中等陣列AmazonMicrosoft

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

範例 1:

輸入: nums = [2,3,1,1,4]
輸出: true

範例 2:

輸入: nums = [3,2,1,0,4]
輸出: false

限制條件:

  • 1 <= nums.length <= 10^4
核心程式碼模式
● 已自動儲存第 1 行,第 1 欄