Computer Science EngineeringHard
A directed acyclic graph has n vertices. How many strongly connected components does it have?
- A. n
- B. 1
- C. n - 1
- D. 0
Correct answer: A. n
With no cycles, no two distinct vertices are mutually reachable, so each vertex forms its own component.
Practise more Algorithms, Data Structures & Programming (ISRO CS) questionsAlgorithms, Data Structures & Programming (ISRO CS): notes and key points
More Algorithms, Data Structures & Programming (ISRO CS) questions
- What is the minimum number of coins needed to make 11 using denominations {1, 5, 6, 9}?
- Huffman coding is applied to frequencies 5, 9, 12, 13, 16, 45. What is the total weighted path length (sum of internal node weights)?
- What is the Theta bound of: for(i=1;i<=n;i++) for(j=1;j<=n;j=2) count++;
- An adjacency matrix representation of a graph with V vertices needs space
- Which hashing technique guarantees O(1) worst-case search time for a static set of keys?
- A singly linked list holds 1->2->3->4->5. After: p=head; while(p->next && p->next->next) p=p->next->next; what is p->data?