MCPcopy Create free account
hub / github.com/algorithm004-01/algorithm004-01 / canJump

Function canJump

Week 03/id_716/LeetCode_55_716.go:9–15  ·  view source on GitHub ↗

https://leetcode-cn.com/problems/jump-game/ 跳跃游戏 贪心算法 要点:从最后1个位置往前找,如果前面的位置能够到达指定的后面的位置,说明是可达的,然后就更新要判断的位置,一直到结束 如果最后没有办法回到起始位置,说明不能到达最后一个位置

(nums []int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected