Search
⌘K
Leetcode 529. Minesweeper
Simulate a Minesweeper click on an m×n board: clicking a mine turns it to 'X', while clicking an empty square requires counting adjacent mines — if the count > 0 set the cell to that digit, otherwise mark it 'B' and recursively reveal all neighbors. The core challenge is a grid flood-fill with adjacency counting (use DFS/BFS) to propagate reveals.
Asked at:
Microsoft
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early March, 2026
Microsoft
Mid-level
Late February, 2026
Microsoft
Principal
Early January, 2026
Microsoft
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.