Help me in writing a logic for the program:
Two 1's are said to be connected if they are adjacent to each other horizontally, vertically & diagonally.
Need to find the largest sector of 1's in the above input string.
For example: In the above input string the largest sector is of size 5.
Please help me.