Minesweeper
A medium-tier problem at 68% community acceptance, tagged with Array, Depth-First Search, Breadth-First Search. Reported in interviews at Applied Intuition and 3 others.
Minesweeper shows up in assessments at Applied Intuition, Yext, Robinhood, and Anduril. The problem looks deceptively simple: click a cell, reveal what's around it, repeat. But the trick is the flood-fill logic. You need to understand when to stop recursing, how to handle revealed vs. unrevealed cells, and when to return the mutated board state. The 68% acceptance rate means most candidates get the basic DFS or BFS right but stumble on edge cases: already-visited cells, boundaries, the distinction between a blank cell (0 adjacent mines) and a mine-adjacent cell. If this hits your live assessment and you blank on the state-management logic, StealthCoder surfaces a working solution in seconds while the proctor watches your screen.
Companies that ask "Minesweeper"
Minesweeper 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 engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage.
Get StealthCoderThe core pattern is flood-fill on a matrix, but Minesweeper adds conditional termination rules. When you click a cell: if it's a mine, return immediately. If it's blank (zero adjacent mines), recursively reveal all neighbors. If it has adjacent mines, stop and reveal just that cell. The gotcha is tracking visited cells to avoid infinite loops, handling the board mutation safely, and distinguishing between 'M' (mine), 'E' (unrevealed), 'B' (blank), and digit states. Most candidates write working DFS but forget to mark cells as visited before the recursive call, causing stack overflow or duplicate processing. BFS avoids recursion depth issues but requires a queue and the same visited-cell discipline. StealthCoder handles the state machine and neighbor enumeration so you don't have to debug off-by-one errors or missed cases during your assessment.
Pattern tags
You know the problem.
Make sure you actually pass it.
Minesweeper recycles across companies for a reason. It's medium-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 engineer who got tired of watching his cohort grind for six months and still get filtered at the OA stage. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Minesweeper interview FAQ
Is Minesweeper actually asked at FAANG-style shops?+
Yes. Applied Intuition, Yext, Robinhood, and Anduril all report it. It's a matrix and graph traversal problem, so it fits the algorithmic screening template. The 68% pass rate suggests it's medium-difficulty but not a gimme. Most failures are logic bugs, not algorithm misunderstanding.
What's the trick that makes candidates fail?+
The state transitions. Candidates write recursive DFS but forget to mark cells visited before recursing, causing infinite loops or revisiting the same cell. Also, the rule about stopping at non-blank cells is easy to misread. You stop at 'B' (blank) after recursing its neighbors, but you stop at digit cells without recursing further.
Should I use DFS or BFS?+
Either works. DFS is shorter to code but risks stack overflow on large boards. BFS is safer and clearer about which cells you've queued. Both require a visited set and the same state-machine logic. Pick whichever you debug faster under time pressure.
How does this relate to other matrix problems I've drilled?+
It's a direct application of flood-fill, same as rotting oranges or island counting. The difference is the stopping condition. Here you stop at digit cells and recurse through blanks. Master that rule and the rest is standard BFS or DFS neighbor enumeration.
What's the edge case that eats time during the OA?+
Clicking on a mine on the first move. Should return immediately with 'X' at that position, no recursion. Also, clicking a cell already revealed. If it's not 'E', return the board unchanged. Miss either and you get WA on the first test case.
Want the actual problem statement? View "Minesweeper" on LeetCode →