Pinterest Interview Question

Write code to generate a grid for Minesweeper (the game)