Google | First Round | Find out number of squares in pattern

image

In firest round of interview interviewer asked me question to find out number of squers in above patters. Also he asked me that which datastrcure is good to store pattern.

Can anyone help me to solve problem

Comments (1)