UVa Online Judge Challenge "572"
Although BFS and DFS were recommended solutions to the problem, I saw an opportunity to solve this problem using Disjoint Sets. The virtual judge run time was 0.050s.

Tag Archive
Entries connected to "Disjoint Set", gathered in one place for quick browsing.
Collection filter
Narrow the entries already loaded here by title, summary, category, or tag.