Minesweeper adjacent mine counter
Filed under Sabre
The question
Given an M x N matrix of '*' (mines) and '.' (empty cells), output a matrix where each empty position is replaced by the count of mines adjacent to it, while mine positions remain '*'.
No write-up yet. Related questions below have one.
Related Sabre questions
Collected from public candidate posts and coding forums. Updated Nov 2026.