UGC Net Computer Science December-12 Paper 3 Page 2 Solved
11. The time complexities of some standard graph algorithms are given.Match each algorithm with its time complexity ? (n and m are no. of nodes and edges respectively)
a. Bellman Ford algorithm 1. O (m log n)
b. Kruskals algorithm 2. O (n3)
c. Floyd Warshall algorithm 3. O(mn)
d. Topological sorting 4. O(n + m)
Codes :
a b c d
(A) 3 1 2 4
(B) 2 4 3 1
(C) 3 4 1 2
(D) 2 1 3 4
Answer A