Data Structures & AlgorithmsModerateTCS NQT · graph theory

Problem: Which characterisation of bipartite graphs is correct?

  1. A. A graph is bipartite if and only if it has no edges
  2. B. A graph is bipartite if and only if it is a tree
  3. C. A graph is bipartite if and only if it contains no odd cycle
  4. D. A graph is bipartite if and only if its degrees are all equal

Correct answer: C. A graph is bipartite if and only if it contains no odd cycle

Two-colouring a connected graph works exactly when every cycle has even length.

More Coding Interview Problems questions

Exams that ask this topic