Data Structures & AlgorithmsHardICPC regional · GATE CS top band

Directed graph on vertices A, B, C, D, E, F, G with edges G→E, A→D, F→A, G→F, C→E, B→E, A→B, B→G, E→G, A→C (no weights). What is the number of vertices in its largest strongly connected component (maximal set where every vertex can reach every other)?

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

Correct answer: B. 6

Mutual reachability gives components of sizes whose maximum is 6. Using weakly connected components instead would ignore edge directions and give 7.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic