Google interview question

A graph question with a pure DFS based approach.

Interview Answer

Anonymous

17 Aug 2024

A follow-up question of above which was solved by UnionFind.