To do this, we can simply add an edge between any two trees, which will connect them without creating a cycle (since trees do not have cycles).
Now, we have connected two trees, so we have $k-1$ trees left. We can repeat this process, connecting another tree to
Show more…