Finding large island in Binary Map
=> one map : (row * column)
=> all zero numbers are water
=> all one numbers are land
Any land(1) can be connected to another land(1) and made an island.
if they are in range:
1 1 1
1 x 1
1 1 1
0000000000
0100101000
0101111010
0101011100
0000000000
The lands are connected and make two islands:
1 1 1
| /|\|
1 1111 1
| |/\\/
1 1 111
Find the largest island
this program help us to find:
1 - largest island
2 - size all islands
3 - categorize islands
with grouping lands we can find largest island
requironments (python3.6 or newer)
curl :
curl -s "https://raw.githubusercontent.com/unprogramable/BinaryisLand/master/BinaryisLand.py" -o BinaryisLand.py
# then run with
python BinaryisLand.py -r 10 -c 10