Computer Science EngineeringHard
How many distinct spanning trees does the complete graph K4 have?
- A. 12
- B. 16
- C. 24
- D. 8
Correct answer: B. 16
Cayley's formula gives n^(n-2) = 4^2 = 16.
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 best-case running time of insertion sort (already sorted input) is
- The recurrence T(n) = T(sqrt(n)) + 1 has the solution
- Prim's algorithm on a graph stored as an adjacency matrix with a simple array for minimum selection runs in
- The postfix form of the infix expression a + b c - d is
- The length of a longest common subsequence of ABCBDAB and BDCABA is
- The 0/1 knapsack problem with n items and capacity W is solved by dynamic programming in time