1.

Are trees bipartite?(a) Yes(b) No(c) Yes if it has even number of vertices(d) No if it has odd number of verticesThe question was asked in an interview for internship.I would like to ask this question from Bipartite Graphs in division Bipartite Graphs of Data Structures & Algorithms II

Answer»

Right CHOICE is (a) Yes

For EXPLANATION: Condition NEEDED is that there should not be an odd cycle. But in a tree there are no CYCLES at all. Hence it is bipartite.



Discussion

No Comment Found

Related InterviewSolutions