Find the number of rectangles with 1s at 4 corners in a 2d array of 1s and 0s
Answers
Answered by
0
Answer:
There is a given binary matrix, we need to find if there exists any rectangle or square in the given matrix whose all four corners are equal to 1.
Step-by-step explanation:
Input :
mat[][] = { 1 0 0 1 0
0 0 1 0 1
0 0 0 1 0
1 0 1 0 1}
Output : Yes
as there exists-
1 0 1
0 1 0
1 0 1
Answered by
0
Ans is
101
O11
010 ...........
101
O11
010 ...........
Similar questions