Consider an n by n grid of squares. A square is said to be a neighbour of another one if it lies directly above/below or to its right/left. Thus, each square has at most four neighbours. Initially, some squares are marked. At successive clock ticks, an unmarked square marks itself if at least two of its neighbours are marked. What is the minimum number of squares we need to mark initially so that all squares eventually get marked?
For an nxn grid of square, initially n squares should be marked in appropriate places so as to obtain solution....
Appropriate places should be chosen such that 2 initially marked squares should be neighbor of an unmarked square... Other initially marked squares should be placed such that, it should help in marking further squares... Source: CoolInterview.com