
INTERVIEW QUESTIONS
GENERAL
PUZZLES
DETAILS
Question: 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?
Answer: 3 square marks initially at location (1,1), (1,2) and (2,1). Then it marks all square by considering atleast 2 marks square.



Category 
Puzzles Interview Questions & Answers 
Exam Mode /
Learning Mode

Rating 
(2.7) By 30 users 
Added on 
9/2/2014 
Views 
269 
Rate it! 


Question:
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?
Answer:
3 square marks initially at location (1,1), (1,2) and (2,1). Then it marks all square by considering atleast 2 marks square. Source: CoolInterview.com
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
Answered by: varun  Date: 12/8/2009
 Contact varun
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:
 There should not be any Spelling Mistakes.
 There should not be any Gramatical Errors.
 Answers must not contain any bad words.
 Answers should not be the repeat of same answer, already approved.
 Answer should be complete in itself.


Related Questions 
View Answer 
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com  Best Freshers & Experienced Jobs Website.
View All Puzzles Interview Questions & Answers  Exam Mode /
Learning Mode
