Consider a directed graph with n vertices and m edges such that all edges have same edge weights. Find the complexity of the best known algorithm to compute the minimum spanning tree of the graph?
(A) O(m+n)
(B) O(m logn)
(C) O(mn)
(D) O(n logm)
Answer: (A)
Explanation: It’s a special case in which all edge weights are equal, so dfs would work and resultant depth first tree would be the spanning tree. So the answer would be O(m+n).
Quiz of this Question
Recommended Posts:
- GATE | GATE MOCK 2017 | Question 1
- GATE | GATE MOCK 2017 | Question 2
- GATE | GATE MOCK 2017 | Question 3
- GATE | GATE MOCK 2017 | Question 4
- GATE | GATE MOCK 2017 | Question 5
- GATE | GATE MOCK 2017 | Question 6
- GATE | GATE MOCK 2017 | Question 7
- GATE | GATE MOCK 2017 | Question 8
- GATE | GATE MOCK 2017 | Question 9
- GATE | GATE MOCK 2017 | Question 10
- GATE | GATE MOCK 2017 | Question 11
- GATE | GATE MOCK 2017 | Question 12
- GATE | GATE MOCK 2017 | Question 13
- GATE | GATE MOCK 2017 | Question 14
- GATE | GATE MOCK 2017 | Question 15
- GATE | GATE MOCK 2017 | Question 16
- GATE | GATE MOCK 2017 | Question 17
- GATE | GATE MOCK 2017 | Question 18
- GATE | GATE MOCK 2017 | Question 19
- GATE | GATE MOCK 2017 | Question 20

