you have a matrix of N x N filled with 1 or 0. you can move only 1 step either right or 1 step down. you need to count maximum number of "connected 1" in given matrix. for example
0 0 1 1
1 1 1 0
1 0 1 0
0 1 0 1
[Start from top left] maximum no. of 1 is 4
[1,0][1,1][1,2][2,2]
Source -: Commented by a user "rakesh"
0 0 1 1
1 1 1 0
1 0 1 0
0 1 0 1
[Start from top left] maximum no. of 1 is 4
[1,0][1,1][1,2][2,2]
Source -: Commented by a user "rakesh"