#55
Jump Game
MediumGreedyYou are given an integer array nums. You start at the first index, and each element represents your maximum jump length from that position. Return true if you can reach the last index, otherwise false.
Example
nums = [2, 3, 1, 1, 4] => true
nums = [3, 2, 1, 0, 4] => false
Implement
function CanJump(nums: int[]) -> bool
Found a bug? Or annoyed about something in the language? Tell us.
loading editor…