Scan grid for 1's.
Find first 1 at some position. DFS: count connected 1's. Say area = 4.
Continue scanning. Find another island. DFS: area = 6. Update max = 6.
Continue. Find more islands with smaller areas.
Return max = 6.
Each cell visited once. time. Recursion stack: worst case.