I read many binary search solution, good, but time complexity is n*O(n)
I feel like DSF on this problem is O(n), am I wrong,
we only go thru '1' grids and once for each, so it is O(n) ?
If do DFS on this problem, isn't the time complexity O(n)?

@三千世界 Considering the matrix has dimension m * n, the total number for elements is m * n. Therefore, worst case DFS is O(m*n).