Count Connected Components of a Bidirectional Graph

Company: Visa

Difficulty: easy