Guys I have been patiently awaiting an editorial for the MineSweeper.I wanted to know the correct approach so that I can implement it on my own for the practise question.I have submitted an answer and it was accepted and my score was 0.514(dont remember the exact value after 0.5) anyways… the approach I followed was I was greedily choosing the cells which had the maximum value of (Number of Adjacent neighbours + itself).When I have found a cell containing a mine then I would assign that corresponding cell a value of 0 and reduce all adjacent neighbour’s value by 1.if somehow anyadjacent neighbour again reduce to 0,I recursively called dfs on it to make all its neighbours 0 again.Also,when I get an int value for a mine,if its 0 den I make the corresponding cell and all its neighbours 0,otherwise I only made that cell 0 if e.g I got 2 when I am surveying a cell.

and then again after it I am greedily choosing the cell with the maximum value.

How can I improve it?I mean how to optimize it further?