FastPrepJump Game
Problems/Jump Game

Jump Game

Paytm logoPaytm● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: In the technical screening round, the interviewer asked a variation of Jump Game, where each number tells you how far you can jump from that spot.

The report does not say what the variation changed, and it gives no examples or limits. Here, you get the usual version: start at the first index, jump forward up to nums[i] steps, and decide if you can reach the last index. The array has up to 10,000 values.

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

You are given an integer array nums. You start at index 0. From index i, you can jump forward to any index from i + 1 to i + nums[i]. You do not have to use the full jump length. A value of 0 means you cannot move on from that index.

Return true if you can reach the last index, or false otherwise.

Function

canJump(nums: int[]) → boolean

Examples

Example 1

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

From index 0, jump 2 to index 2. From index 2, jump 2 to index 4, which is the last index.

Example 2

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

From index 0 you can only reach index 1. From index 1 you can reach index 2 or 3, and both hold 0. So you get stuck and never reach index 4.

Example 3

nums = [0]return = true

The array has one element, so you already stand on the last index.

Constraints

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

More Paytm interview questions

  • Nth Highest SalaryPHONE SCREEN · Seen Nov 2026
  • Second Highest SalaryPHONE SCREEN · Seen Nov 2026
  • LRU Cache with Expiring EntriesPHONE SCREEN · Seen Sep 2026
  • Detect a Linked-List CycleONSITE INTERVIEW · Seen Sep 2026
  • Find First and Last Position in Sorted ArrayONSITE INTERVIEW · Seen Sep 2026
  • Minimum Coins for a TargetONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • 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
  • Best Time to Buy and Sell StockJP Morgan Chase · PHONE SCREENJP Morgan Chase interview questions
All Paytm interview questionsSee Paytm hiring insights
Saved
class Solution {
    public boolean canJump(int[] nums) {
        // Write your solution here.
    }
}
Checking account…