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 March, 2026

Microsoft

Microsoft

Mid-level

Late February, 2026

Microsoft

Microsoft

Principal

Early January, 2026

Microsoft

Microsoft

Senior

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