Reveal Cells After a Click

Asked at Nuro · Coding Questions · Difficulty: Medium

A grid of hidden cells, some of which hide mines, is shown to a player who clicks one cell. Depending on what is under the click, the cell is revealed and, when there are no mines nearby, the reveal spreads outward to the neighbouring cells. Given the board and the click position, apply the reveal and return the updated board.

Loading the problem…