Question 58

Computer Awareness Graphs Hard

Match List - I with List - II

section*{List - I (Algorithms)}
(A) Bellman - Ford algorithm (with adjacencylist representation)
(B) Dijkstra Algorithm
(C) Prim's Algorithm
(D) Topological sorting (with adjacency list representation)


{List - II (Complexity)}
(I) \( \mathrm{O}\left(|\mathrm{V}|^{2}\right) \)
(II) \( \mathrm{O}((\mathrm{V}+\mathrm{E}) \log \mathrm{V}) \)
(III) \( \mathrm{O}(\mathrm{nm}) \)
(IV) \( \mathrm{O}(\mathrm{n}+\mathrm{m}) \)

(A) [(A - III); (B - I); (C - II); (D - IV)]
(B) [(A - II); (B - IV); (C - III); (D - I)]
(C) \( [(\mathrm{A}-\mathrm{III}) ;(\mathrm{B}-\mathrm{IV}) ;(\mathrm{C}-\mathrm{I}) ;(\mathrm{D}-\mathrm{II})] \)
(D) \( [(\mathrm{A}-\mathrm{II}) ; \) (B - I); (C - III); (D - IV)]
View Dynamic Solution & Explanation
Correct Solution: Option A

Step-by-step Solution:

### Final Matching: | List - I (Algorithms) | List - II (Complexity) |
|---------------------------|---------------------------|
| (A) Bellman-Ford | (III) \( O(VE) \) |
| (B) Dijkstra | (I) \( O((V^2)) \) |
| (C) Prim's | (II) \( O((V+E) \log V) \) |
| (D) Topological Sorting | (IV) \( O(V+E) \) |