GATE Computer ScienceHardGATE CSE · NIELIT

A directed graph on vertices 0–9 has edges 0→1, 1→2, 2→0, 2→3, 3→4, 4→5, 5→3, 5→6, 6→7, 7→6, 8→7, 8→9, 9→8. How many strongly connected components does it have?

  1. A. 5
  2. B. 4
  3. C. 3
  4. D. 6

Correct answer: B. 4

The components are {0,1,2}, {3,4,5}, {6,7} and {8,9}, so 4.

More Algorithms questions

Exams that ask this topic