def number_board(board: list[list[int]]) -> list[list[int]]:
The round: three reports from Nuro coding rounds, March to August 2026; one was a phone screen and one an AI Platform intern interview. All three name Minesweeper. One report calls it BFS. The intern report gives two parts and the board encoding. In Part 1 nothing is clicked: you output the board with every cell revealed, which is mostly about the number each cell next to a mine should show. Part 2 is a click that reveals cells by DFS. That candidate got stuck on Part 2 because they had not pinned down when to keep spreading, finished part of it with the interviewer's help, and advises clarifying first: spread only from a cell that is empty and has no mine around it. Two graded parts.
The board (reported encoding)
-1 is a mine. 0 is an empty cell not revealed yet.-2 is a revealed empty cell with no mine around it.1 to 8 is a revealed cell, showing how many of its 8 neighbours (including diagonals) are mines.Part 1 — number the whole board
def number_board(board: list[list[int]]) -> list[list[int]]: ...
board holds only -1 and 0. Return a new board where every mine stays -1 and every other cell is revealed: its mine count 1 to 8, or -2 if it has no mine around it.ValueError. An empty board gives [].Notes: the two parts, the encoding and the rule for when to keep spreading are reported. The 8-neighbour rule is standard Minesweeper and is our reading. The function names, the 400 x 400 test, returning a new board, what a click on a mine does, and the ValueError rules are ours. Win detection and what happens after a mine is clicked are not reported. The reported count range reads 0 to 8; a revealed cell with no mine around it is -2, so here counts run 1 to 8.
Three reports, March to August 2026; one says other companies ask Minesweeper too. In the intern report the interviewer split it into two parts and gave the cell encoding. That candidate got stuck on Part 2 because they had not settled when the reveal keeps spreading, wrote part of the answer with the interviewer's help, and advises clarifying that rule before coding. Of the other two, one passed the coding rounds and one passed the phone screen; both were later stopped at other rounds. Win detection and clicking a mine are not mentioned in any report.
What the reports say: Minesweeper in two parts. Part 1 numbers every cell without a click. Part 2 reveals a click by DFS (another report calls it BFS). The candidate who reported both parts got stuck on Part 2 and advises clarifying first: keep spreading only from a cell that is empty and has no mine around it. The reported encoding is -1 mine, 0 hidden, -2 revealed blank, and the count for a numbered cell.
Common mistakes (ours, not reported): Spreading from numbered cells; deep recursion on a big open board; counting 4 neighbours instead of 8; reusing 0 for a revealed blank.
Edge cases to test (ours): A click next to a mine; a click on a mine; edges and corners; a wall of numbers the spread must not cross.
The round: three reports from Nuro coding rounds, March to August 2026; one was a phone screen and one an AI Platform intern interview. All three name Minesweeper. One report calls it BFS. The intern report gives two parts and the board encoding. In Part 1 nothing is clicked: you output the board with every cell revealed, which is mostly about the number each cell next to a mine should show. Part 2 is a click that reveals cells by DFS. That candidate got stuck on Part 2 because they had not pinned down when to keep spreading, finished part of it with the interviewer's help, and advises clarifying first: spread only from a cell that is empty and has no mine around it. Two graded parts.
The board (reported encoding)
-1 is a mine. 0 is an empty cell not revealed yet.-2 is a revealed empty cell with no mine around it.1 to 8 is a revealed cell, showing how many of its 8 neighbours (including diagonals) are mines.Part 1 — number the whole board
def number_board(board: list[list[int]]) -> list[list[int]]: ...
board holds only -1 and 0. Return a new board where every mine stays -1 and every other cell is revealed: its mine count 1 to 8, or -2 if it has no mine around it.ValueError. An empty board gives [].Part 2 — click a cell and reveal
def reveal(board: list[list[int]], row: int, col: int) -> list[list[int]]: ...
board uses the full encoding above. Return the board after clicking (row, col); do not change the board passed in.-2 and keeps going to all 8 neighbours. Unrevealed neighbours are revealed the same way, so the spread continues only through cells that are empty and have no mine around them. Numbered cells are revealed and stop the spread.ValueError.Notes: the two parts, the encoding and the rule for when to keep spreading are reported. The 8-neighbour rule is standard Minesweeper and is our reading. The function names, the 400 x 400 test, returning a new board, what a click on a mine does, and the ValueError rules are ours. Win detection and what happens after a mine is clicked are not reported. The reported count range reads 0 to 8; a revealed cell with no mine around it is -2, so here counts run 1 to 8.
What the reports say: Minesweeper in two parts. Part 1 numbers every cell without a click. Part 2 reveals a click by DFS (another report calls it BFS). The candidate who reported both parts got stuck on Part 2 and advises clarifying first: keep spreading only from a cell that is empty and has no mine around it. The reported encoding is -1 mine, 0 hidden, -2 revealed blank, and the count for a numbered cell.
Common mistakes (ours, not reported): Spreading from numbered cells; deep recursion on a big open board; counting 4 neighbours instead of 8; reusing 0 for a revealed blank.
Edge cases to test (ours): A click next to a mine; a click on a mine; edges and corners; a wall of numbers the spread must not cross.
If you have had this round, tell us how close this page was. It is how we keep the pages accurate.
Send them this page. It is free to read, no account needed.
What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 27 Nuro questions, refreshed monthly from new candidate reports.