I will give you the Cities and Roads task. You get cities and some roads, and you must add the fewest roads to make the graph connected. If the graph has connected components, you need roads to join them into one piece.
You can solve it by running a traversal from each unvisited node, counting components, and outputting the count minus one. You will use the same traversal idea in the next sections, so this problem sets your target.