Distinct Moves
Reported by candidates from Flexport's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Flexport's June OA included a problem called Distinct Moves, and you're looking at it because you have no idea what it's asking yet. The title alone doesn't tell you much, but that's intentional. Distinct Moves is almost certainly a constraint-satisfaction or state-enumeration problem where you count or generate valid moves under specific rules. It could be a game-state problem, a path-counting variant, or a combinatorial problem with a deceptively simple name. Since you're taking this in the next 48 hours, you need the pattern fast. StealthCoder reads the actual problem text live and hands you the approach when you're staring at it.
Pattern and pitfall
Without the full problem text, the pattern hinges on what 'distinct' and 'moves' mean in context. If it's a chessboard or grid problem, you're counting unique positions reachable from a start. If it's a game tree, you're enumerating valid game states. If it's combinatorial, you're counting non-equivalent move sequences. The trick is almost always that a naive enumeration is too slow, and you need to recognize symmetry, memoization, or a mathematical formula to collapse the search space. Dynamic programming or backtracking with pruning is the hedge. When you see the full problem during the OA, StealthCoder will map it to the right pattern immediately and show you the skeleton code to avoid blanking under pressure.
The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.
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. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Flexport's OA.
Flexport reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Distinct Moves FAQ
Is this a graph traversal or a combinatorics problem?+
Without the full text, it's ambiguous, but 'distinct moves' in assessment contexts usually means either counting reachable states (graph/BFS) or enumerating valid action sequences (backtracking/DP). The OA text will clarify. If it smells like chess or grid movement, think BFS or DFS with memoization.
How do I solve this in 20 minutes if I don't recognize the pattern?+
Start by identifying the state representation and what makes two moves distinct. Write a brute-force recursive solution first, even if it's slow. Then optimize by detecting repeated subproblems and adding a memo dict. If time runs out, a correct slow solution beats nothing. StealthCoder can fast-track you to the optimized version live.
Is Distinct Moves still being asked at Flexport in 2024?+
Yes, it was reported on June 24, 2024. Flexport uses similar problems to test constraint reasoning and algorithmic thinking. Don't assume it's been replaced. Prepare as if it's live.
What's the most common pitfall on this type of problem?+
Forgetting to handle symmetry or double-counting. If the problem is about board positions, rotating or flipping the board can produce the same state. Also, candidates often miss that 'distinct' might mean order-independent (set of moves vs. sequence of moves). Re-read the definition twice.
Can I solve this without code in the first 5 minutes?+
Try. Sketch the state graph on paper, trace through a small example by hand, and identify the recurrence. If you see it, code fast. If you don't, ask the problem text the hard questions: what's the base case, what counts as distinct, and is there a closed-form math shortcut. Flexport likes candidates who think before they type.