It is required to find the maximum area of the figure. A figure is a group of cells that has a shared side (1 means that the cell is filled in, 0 - empty).
INPUT:
6 10 // array size
1 1 0 0 0 0 0 1 1 0
0 1 1 1 0 1 0 1 1 0
0 1 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 1 0
0 1 1 1 0 0 1 1 1 0
0 0 0 0 0 0 0 0 0 0
OUTPUT:
12 (The maximum area of a figure consisting of ones)
Code in C to solve my problem by recursive FloodFill algorithm was