Odd Even Jump
A hard-tier problem at 41% community acceptance, tagged with Array, Dynamic Programming, Stack. Reported in interviews at Google and 0 others.
Odd Even Jump is a hard DP problem that Google has asked repeatedly. You're given an array and need to determine which starting indices let you reach the last element by making valid jumps. The trap: the jump rules alternate between odd and even indices, and most candidates freeze trying to simulate every possible path. If this lands in your Google assessment and you blank on the state transition, StealthCoder surfaces the working solution in seconds, invisible during screen share.
Companies that ask "Odd Even Jump"
Odd Even Jump is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoderThe key insight is that you can't just greedily jump; you need to track whether you're on an odd or even jump number, and what values you've already visited. The real trick is preprocessing: sort the array to know which element you'll jump to next, then use dynamic programming backward from the end. Most people attempt a recursive brute force, hit exponential time, and abandon. The monotonic stack or ordered set approach lets you precompute jump destinations efficiently. This problem sits at the intersection of array sorting, DP state management, and stack-based optimization. StealthCoder is your hedge for the pattern recognition phase, especially if you haven't drilled ordered set tricks before.
Pattern tags
You know the problem.
Make sure you actually pass it.
Odd Even Jump recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Odd Even Jump interview FAQ
Is Odd Even Jump actually asked at Google, or is that old data?+
Google's interview data shows it in their problem pool. Hard DP problems with stack components are their style. It's not mainstream across all FAANG, so most candidates won't have prepped it. That's the real risk: you're expected to solve it cold.
What's the most common wrong approach?+
Recursion with memoization on just the index. Candidates forget to track odd vs. even state, so they recompute the same subproblems. That plus no preprocessing of jump targets makes it TLE. You need both the state vector and precomputed jumps.
Why is Dynamic Programming necessary here?+
You have overlapping subproblems: from any index, whether you can reach the end depends on what jumps are available from there, and that recurs. DP caches those results. Without it, you're exploring the same states multiple times, making the algorithm exponential.
How does Monotonic Stack or Ordered Set fit in?+
After sorting the array, you need to quickly find the next smaller (for even jumps) or next larger (for odd jumps) element from any position. Monotonic stack or a balanced tree structure gives you O(log n) or O(n) preprocessing, cutting overall time down to O(n log n).
If I don't know the pattern, can I brute force and iterate?+
No. Brute force exploration of all jumps is exponential in array size. You'll time out on anything beyond tiny test cases. The problem forces you to think DP plus preprocessing, not raw simulation. That's why many candidates freeze.
Want the actual problem statement? View "Odd Even Jump" on LeetCode →