Shouldnt we check whether the graph is connected or not?

Shouldnt we check whether the graph is connected or not?

what would be ur approach to check if the graph is connected or not

i think it would be similar to check if a cycle is present or not