Myvideo

Guest

Login

102 - Jump Game II - Dynamic Programming approach 2

Uploaded By: Myvideo
1 view
0
0 votes
0

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:

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later