https://oj.leetcode.com/problems/jump-game-ii/
Each element in the array represents your maximum jump length at that position.
Your goal is to reach the last index in the minimum number of jumps.
For example: Given array A = [2,3,1,1,4] The minimum number of jumps to reach the last index is 2.
(Jump 1 step from index 0 to 1, then 3 steps to the last index.)
'풀어본 Algorithm 문제 정리' 카테고리의 다른 글
[OJ.leetcode] maximum-subarray (1) | 2014.07.28 |
---|---|
[Oj.leetcode] swap-nodes-in-pair (0) | 2014.07.27 |
[OJ.leetcode] minimum-depth-of-binary-tree (0) | 2014.07.22 |
[OJ.leetcode] minimum-path-sum (0) | 2014.07.19 |
[OJ.leetcode] reverse-nodes-in-k-group (0) | 2014.07.17 |