You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're on a quest to unlock the ultimate travel destination, hidden behind a series of mystical landmarks. To reveal the secret location, you'll need a magical itinerary unlocked by pronouncing the right travel spell. This spell is concealed within a collection of magical travel guides scattered across the world. You start at the first landmark, with each number in the cryptic magical code representing the allure and wonder of each destination. Your goal is to journey through these landmarks, soaking in their magic and accumulating enough travel energy to unveil the ultimate destination hidden at the end.
Return true if you can reach the final landmark while absorbing enough travel energy to discover the ultimate destination, or false otherwise.
Input Format:
Line 1 - an integer that signifies the size of “nums”
Line 2 - a sequence of integers “nums” that signifies the magical code
Constraints:
1 <= nums.length <= 10^4 0 <= nums[i] <= 10^5
Output Format:
return true/false
Sample Input 0
5
2 3 1 1 4
Sample Output 0
true
Explanation 0
Jump 1 step from index 0 to 1, then 3 steps to the last index.
Sample Input 1
5
3 2 1 0 4
Sample Output 1
false
Explanation 1
You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index
The text was updated successfully, but these errors were encountered:
The repo is missing an important problem:
You're on a quest to unlock the ultimate travel destination, hidden behind a series of mystical landmarks. To reveal the secret location, you'll need a magical itinerary unlocked by pronouncing the right travel spell. This spell is concealed within a collection of magical travel guides scattered across the world. You start at the first landmark, with each number in the cryptic magical code representing the allure and wonder of each destination. Your goal is to journey through these landmarks, soaking in their magic and accumulating enough travel energy to unveil the ultimate destination hidden at the end.
Return true if you can reach the final landmark while absorbing enough travel energy to discover the ultimate destination, or false otherwise.
Input Format:
Line 1 - an integer that signifies the size of “nums”
Line 2 - a sequence of integers “nums” that signifies the magical code
Constraints:
1 <= nums.length <= 10^4 0 <= nums[i] <= 10^5
Output Format:
return true/false
Sample Input 0
5
2 3 1 1 4
Sample Output 0
true
Explanation 0
Jump 1 step from index 0 to 1, then 3 steps to the last index.
Sample Input 1
5
3 2 1 0 4
Sample Output 1
false
Explanation 1
You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index
The text was updated successfully, but these errors were encountered: