Aspiring Minds interview question

Graph islands problem.

Interview Answer

Anonymous

25 June 2020

I know the answer using bfs.