Computer Science EngineeringHardISRO SC (CS)
A connected simple undirected graph has 10 vertices and 17 edges. The minimum number of edges that must be removed to obtain a spanning tree is:
- A. 7
- B. 9
- C. 8
- D. 17
Correct answer: C. 8
A spanning tree has V-1 = 9 edges; remove E-(V-1) = 8.
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
- The worst-case number of key comparisons binary search makes on a sorted array of 7 elements (counting one three-way comparison per probe)…
- The postfix expression 3 3 2 + 6 1 evaluates to:
- int f(int x){ return x ^ (x >> 1); } What does f(201) return? (This is the binary-reflected Gray code.)
- Consider the following C fragment. int c=0; for(int i=0;i<15;i++) for(int j=i+1;j<15;j++) for(int k=j+1;k<15;k++) c++; What is c at the end?
- A DAG has vertices 1..6 and edges 1->2, 2->6, 3->4, 4->5. The number of distinct topological orderings is:
- How many structurally distinct binary trees (left and right children distinguished) with exactly 5 nodes have height exactly 3 edges?