Divide and Conquer: GATE CS Previous Year Questions

Divide and Conquer · Algorithms

6 questions · asked in 5 of 27 years (2000–2026)

MCQ 4 · NAT 21-mark 4 · 2-mark 2

2000Questions per year2026

Questions 6–6 of 6

Q6GATE 20051 markMCQ−0.33 if wrong
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.
1.Bellman-Ford algorithmA:O(mlog⁡n)2.Kruskal’s algorithmB:O(n3)3.Floyd-Warshall algorithmC:O(nm)4.Topological sortingD:O(n+m)\begin{array}{|ll|ll|}\hline \text{1.} & \text{Bellman-Ford algorithm} & \text{A:} & \text{$O(m\log n)$} \\\hline \text{2.} & \text{Kruskal's algorithm} & \text{B:}& \text{$O(n^3)$} \\\hline \text{3.}& \text{Floyd-Warshall algorithm} & \text{C:} & \text{$O(nm)$} \\\hline \text{4.} & \text{Topological sorting} &\text{D:} & \text{$O(n+m)$} \\\hline \end{array}

Keep practising

Topics in Algorithms

All CS topics ›