Microsoft Interview Question

Number of connected components in a graph