FastPrepCan You Jump to the Last Index
Problems/Can You Jump to the Last Index

Can You Jump to the Last Index

Adobe logoAdobe● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This problem asks whether forward jumps, each at most as long as the value you stand on, can carry you from the first index of an array to the last. The source is one post from November 2022 in which a front-end engineer reviews interviews at several companies. At Adobe the author cleared the opening round and was turned down after the second one. That first round was mostly front-end and JavaScript topics. Its one data-structures task was asked at the very end. It is a well-known problem that the author names by its title and says was asked word for word. The post gives no limits, examples or answer for it.

The rules here are those of the named task: start at index 0, move forward by 1 up to nums[i] steps, and answer true or false. Our choices: 1 to 10^4 values from 0 to 10^4, and new examples.

Our version is about 95% the same as the reported question.

You stand on index 0 of the array nums. From index i you may jump forward by any whole number of steps from 1 up to nums[i]. A value of 0 means you cannot move on from that index.

Return true if some sequence of jumps lands on the last index, and false otherwise. The value stored at the last index does not matter, and with only one element you are already there.

Function

canReachLast(nums: int[]) → boolean

Examples

Example 1

nums = [1,3,0,0,2,0]return = true

From index 0 jump 1 step to index 1. Its value 3 lets you jump to index 4, past both zeros. From index 4 one step reaches index 5, the last index.

Example 2

nums = [2,0,1,0,3]return = false

From index 0 you can reach index 1 or 2. Index 1 holds 0, and index 2 holds 1, which only reaches index 3. Index 3 holds 0, so no path gets past it to index 4.

Example 3

nums = [0]return = true

The array has one element, so you start on the last index. No jump is needed.

Constraints

  • 1 <= nums.length <= 10^4
  • 0 <= nums[i] <= 10^4

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Jump GamePaytm · PHONE SCREENPaytm interview questions
  • Minimum Cost for a Target WeightPace Stock Broking Services · PHONE SCREEN
  • Jump Game IINavi · PHONE SCREEN
  • Best Stock Profit With a Sell FeeKaseya · PHONE SCREEN
  • Return a Minimum-Coin Change BreakdownDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • Most Relevant Text SpanHebbia · PHONE SCREEN
  • Fewest Jumps to the End of an ArrayRippling · PHONE SCREENRippling interview questions
  • Split Array to Minimize the Largest SumNation with NaMo · PHONE SCREEN
  • Best Time to Buy and Sell StockOracle · PHONE SCREEN · ONSITE INTERVIEWOracle interview questions
  • Best Time to Buy and Sell StockJP Morgan Chase · PHONE SCREENJP Morgan Chase interview questions

Interview reports that mention this question

  • Adobe Frontend and QA Interviews: 14 Experiences (Part 6 of 6)

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe New Grad MTS Interview Questions: 7 Experiences
  • Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public boolean canReachLast(int[] nums) {
        // Write your code here.
    }
}
Checking account…