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.