Pregunta de entrevista de Flipkart

Longest connected component in a graph