Reported May 2025
Meesho

Distinct Moves

Reported by candidates from Meesho's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Meesho OA. Under 2s to a working solution.
Founder's read

Meesho's May 2025 OA included a problem called Distinct Moves, and you're facing it in the next day or two. The title hints at counting or enumerating unique states or actions, which typically lands as a combinatorics, graph traversal, or dynamic programming problem. If the problem text asks you to count the number of ways to reach a goal or find unique paths under constraints, you're looking at a state-space search. StealthCoder will read the exact problem during your OA and surface the pattern instantly if you blank on approach.

Pattern and pitfall

Distinct Moves problems usually boil down to one of three patterns: enumerate all valid sequences (backtracking or recursion), count paths in a grid or graph (DP or BFS), or find unique transformations under rules (graph traversal). The trick is recognizing whether you're building a solution forward (backtracking) or filling a DP table backward (bottom-up). Most candidates overthink the "distinct" part and miss that duplicate states can be pruned by a set or memo table. The common pitfall is infinite loops from revisiting states. If you're stuck on the live OA, StealthCoder gives you the structure: are you counting, searching, or transforming? That answer unlocks the code path.

Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.

If this hits your live OA

You can drill Distinct Moves cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.

Get StealthCoder
⏵ The honest play

You've seen the question. Make sure you actually pass Meesho's OA.

Meesho reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Distinct Moves FAQ

What does 'Distinct Moves' usually mean in a coding OA?+

It means count or enumerate unique sequences of actions that satisfy a constraint. Often it's paths, transformations, or states. The word 'distinct' tells you to avoid duplicates, usually via a set, seen map, or memoization table. This is why it's often DP or backtracking.

Is this problem graph-based or array-based?+

Without the full problem text, it could be either. But Distinct Moves problems reported in May 2025 from Meesho tend to be grid paths or state transitions. Check if there's a grid, a starting point, and constraints on movement direction. That's your signal.

How do I avoid TLE on Distinct Moves?+

Memoize or mark visited states early. If you're doing backtracking, prune aggressively. If DP, make sure you're not recalculating subproblems. A set of visited states or a DP cache usually cuts runtime from exponential to polynomial.

Can I brute force this?+

Only if the state space is tiny (under 10,000 states). For most Distinct Moves problems, brute force recurses forever or TLEs. You'll need memoization or DP to pass. The constraints on the input usually signal this.

Should I code this top-down or bottom-up?+

Top-down (recursion with memo) is faster to code and debug in an OA. Bottom-up is cleaner if you see the DP table shape clearly. For Distinct Moves, top-down with a cache usually wins because state transitions aren't always obvious row-by-row.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Meesho.

OA at Meesho?
Invisible during screen share
Get it