MINESWEEPER

  • AUTHOR: // CATEGORY: certificaciones, codeeval, codeeval / hard, php, ranking

    Descripcion:

    You will be given an M*N matrix. Each item in this matrix is either a ‘*’ or a ‘.’. A ‘*’ indicates a mine whereas a ‘.’ does not. The objective of the challenge is to output a M*N matrix where each element contains a number (except the positions which actually contain a mine which will remain as ‘*’) which indicates the number of mines adjacent to it. Notice that each position has at most 8 adjacent positions e.g. left, top left, top, top right, right, …

     

     

COMMENTS

0 Responses to Minesweeper