Number of Ways to Earn Points
A hard-tier problem at 59% community acceptance, tagged with Array, Dynamic Programming. Reported in interviews at TuSimple and 0 others.
Number of Ways to Earn Points is a hard DP problem that TuSimple asks. With an acceptance rate near 59%, it's harder than it looks, and most candidates miss the state setup on their first attempt. The problem forces you to think about overlapping subproblems in a non-obvious way. You either nail the recurrence relation or you spend 30 minutes backtracking. If you hit this live and blank on the structure, StealthCoder surfaces a working solution invisible to the proctor, buying you the time to recover and code it cleanly.
Companies that ask "Number of Ways to Earn Points"
Number of Ways to Earn Points 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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe trick is recognizing that you can't just greedily pick the highest-value moves. You need to track two concurrent indices as you iterate through the problem state, which most candidates try to solve with a single DP dimension and then realize it doesn't capture enough information. The common failure is setting up a 1D DP array when the problem actually requires 2D state. Once you see that you're choosing between two different paths at each step and need to count all valid combinations, the recurrence becomes clear. Array and Dynamic Programming topics both matter equally. This is where the pattern recognition pays off. If you've drilled similar DP problems that require tracking multiple positions, you'll spot the dependency graph fast. StealthCoder is the safety net if the state definition doesn't click during the assessment.
Pattern tags
You know the problem.
Make sure you actually pass it.
Number of Ways to Earn Points 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. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Number of Ways to Earn Points interview FAQ
Is this actually asked at TuSimple or just one report?+
TuSimple has confirmed it. Hard problems from single companies often signal hiring focus on algorithmic depth. Doesn't mean it'll be on your loop, but if you're targeting them specifically, this deserves prep.
How much does the 59% acceptance rate matter if it's marked hard?+
59% is notably high for a hard problem, which means the pattern is learnable and deterministic. Not a random-failure problem. Once you understand the state transitions, you can solve it reliably.
What's the trap most people hit on this one?+
Trying to solve it with a single loop and one DP index. The problem requires tracking two positions simultaneously. Once you move to 2D DP, the logic becomes mechanical.
Does this require advanced DP or is it just careful implementation?+
It's careful state design, not advanced theory. The hard rating comes from not realizing you need two indices, not from complex memoization or pruning tricks.
Should I study this if I'm not targeting TuSimple?+
If Array and Dynamic Programming are on your hit list, yes. The multi-index DP pattern transfers to other problems. It's a core technique, not a one-off.
Want the actual problem statement? View "Number of Ways to Earn Points" on LeetCode →