This question evaluates algorithmic problem-solving and concurrency engineering skills by combining a BFS-based grid-reveal algorithm for minefield traversal and a thread-safe periodic job scheduler requiring synchronization and scheduling semantics.
The interview report described two coding questions in the same category:
m x n
board representing a hidden minefield. Each cell is one of:
M
: unrevealed mine
E
: unrevealed empty cell
B
: revealed blank cell with no adjacent mines
1
-
8
: revealed cell showing the number of adjacent mines
X
: revealed mine after a click
(row, col)
, update the board using these rules:
M
), change it to
X
.
B
and continue revealing its unrevealed neighbors.
jobId
N
milliseconds
register(jobId, intervalMs, task)
cancel(jobId)
start()
stop()