Count no. of connected components in N * N matrix (N <= 1e9)

Revision en2, by Sammmmmmm, 2023-08-10 16:12:13

Given an N * N matrix consisting of k ones and the rest are 0s.Count the number of connected components that contains only zeros

N <= 1e9

K <= 1e5

Thanks!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Sammmmmmm 2023-08-10 16:12:13 10 Tiny change: 'ents that only contains zeros\n\n' -> 'ents that contains only zeros\n\n'
en1 English Sammmmmmm 2023-08-10 16:10:09 224 Initial revision (published)