Instance: G = (V, E) a graph and k ∈ N ∗ .
Question: Is there a partition of V of cardinality k, V1, V2, . . . , Vk such that each Vi induces a connected subgraph (i. e., [Vi ]G is connected for each i = 1, k)?
Describe an algorithm of time complexity O(|V | + |E|) that solves this problem (hence, CPARTITION ∈ P ).