UGC NET Paper 2 (Computer Science)Hard

Consider. I. Kruskal's algorithm runs in O(E log E) with sorting. II. Prim's algorithm with a binary heap runs in O(E log V). III. Johnson's all-pairs shortest path with Fibonacci heaps runs in O(V^2 log V + VE). Which are correct?

  1. A. I, II and III
  2. B. I and II only
  3. C. II and III only
  4. D. I and III only

Correct answer: A. I, II and III

All three bounds are standard; Johnson handles negative edges by reweighting using Bellman-Ford.

More UGC NET Computer Science and Applications questions

Exams that ask this topic