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

Microsoft

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early January, 2026

Microsoft

Microsoft

Senior

Late November, 2024

Meta

Senior

Implement Minesweeper game with a slight variation

Late November, 2024

Meta

Senior

Implement Minesweeper game with a slight variation

Comments

Your account is free and you can post anonymously if you choose.