Flipkart interview question

Longest connected component in a graph