101 - Jump Game II - Dynamic Programming approach 1
Pseudo code:
// int[] nums
int level = 0, left = 0, right = 0;
while (right is less than ( - 1)) {
int farthest = 0;
for (int i = left; i is less than or equal to right; i ) {
farthest = MAX(farthest, i nums[i]);
}
left = right 1;
right = farthest;
level ;
}
return level;
Leetcode:
Github:
0 views
2733
929
8 years ago 00:04:30 6K
Friday Pudge - EP. 101
11 years ago 00:06:12 15
Thief - 101 Trailer
9 years ago 01:00:35 2.4K
Прайм Тайм 101
4 years ago 00:04:52 580
Magic: Legends - Official ’Deckbuilding 101’ Trailer