Graph Theory37 sections · 1633 units
Open in Course

Problem - Implement Solution

(CSES 1675)

Time to implement the solution from scratch. Use Kruskal's algorithm with Union-Find. Do not forget to check if the graph is connected. Test the solution on the sample inputs. Make sure it handles disconnected graphs correctly.

Try edge cases: already connected, completely disconnected, single node. If you get stuck, review the pseudocode and implementation from the previous units. Take it step by step.