FastPrepJump Game
Problems/Jump Game

Jump Game

Zillow logoZillow● MediumNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in December 2022 at Zillow by a candidate for a junior Software Engineer opening in the United States, who rated the experience negative and did not get an offer. Two interviewers ran the coding round, which asked the Jump Game task. The candidate was surprised the question was that hard given the junior level, and got to an answer with help from the interviewer.

The report names the task but does not spell out its rules; we read it as the classic version that asks whether the last index can be reached, not the one that counts the fewest jumps. Our choices: the function canJump gets the array nums, where each value is the longest jump allowed from that index, starts at index 0, and returns true or false. The limits (1 to 10,000 values, each from 0 to 100,000) are ours as well.

The report does not call this interview a phone screen or an onsite round. It describes a single coding interview, and nothing marks it as a final round, so we list it as a phone screen, our default for such reports.

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

An integer array nums holds n values, and you begin on index 0. Each value nums[i] caps how far a single jump from index i can go: the jump may land on any index j with i < j <= i + nums[i], provided j is still a position in the array. So a 0 at index i leaves you no move from there.

Return true when some sequence of jumps lands on the last index (index n - 1), and false otherwise.

Function

canJump(nums: int[]) → boolean

Examples

Example 1

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

Jump 1 step from index 0 to index 1, then 2 steps to index 3, then 1 step to index 4. Since n is 5, index 4 is the last index.

Example 2

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

Index 0 allows a jump to index 1 or 2, and index 1 allows a jump to index 2 and no farther. The value at index 2 is 0, so every path stops there and index 3, the last index, stays out of reach.

Example 3

nums = [0]return = true

With a single value, index 0 is also the last index, so you are done before making any jump; the 0 stored there never matters.

Constraints

  • 1 <= nums.length <= 104
  • 0 <= nums[i] <= 105

More Zillow Phone Screen questions

  • Valid ParenthesesPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2025
  • Time Based Key-Value StorePHONE SCREEN · Seen Feb 2024
  • Filter Formatted Records by CriteriaPHONE SCREEN · Seen Sep 2023
  • Build a Hash TablePHONE SCREEN · ONSITE INTERVIEW · Seen Feb 2023
  • Reversible Run-Length EncodingPHONE SCREEN · Seen Nov 2022
  • Spiral MatrixPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2022
  • Two Sum: All PairsPHONE SCREEN · Seen Nov 2022
  • Employee Free TimePHONE SCREEN · Seen Oct 2022
  • First Unique Character in a StringPHONE SCREEN · Seen Oct 2022
  • K-th Smallest Number in a StreamPHONE SCREEN · Seen Oct 2022

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
  • Fewest Jumps to the End or StuckAdobe · PHONE SCREENAdobe interview questions
  • 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
All Zillow interview questionsSee Zillow hiring insights
Saved
class Solution {
    public boolean canJump(int[] nums) {
        // Write your code here.
    }
}
Checking account…