We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Approach:
1. Iterating from start to Total Length - 1.
2. Max Jump (start + 2) == 0? if yes add on 2 to start.
3. If != 0, Need to avoid, so add on 1 to start.
4. for each iteration jumps increments,
Jumping on the Clouds
You are viewing a single comment's thread. Return to all comments →
Java Solution:
Approach: 1. Iterating from start to Total Length - 1. 2. Max Jump (start + 2) == 0? if yes add on 2 to start. 3. If != 0, Need to avoid, so add on 1 to start. 4. for each iteration jumps increments,