Data Structures & AlgorithmsVery hardICPC regional · shortest paths

Problem: Which problem is solved by Dijkstra's algorithm on a graph whose edge weights are small integers, using buckets (Dial's algorithm)?

  1. A. Shortest paths with bucket queues in O(E + maxW * V)
  2. B. Minimum spanning tree in O(V)
  3. C. Topological sort
  4. D. Matrix chain multiplication

Correct answer: A. Shortest paths with bucket queues in O(E + maxW * V)

Dial's algorithm replaces the heap with an array of buckets indexed by distance.

More Coding Interview Problems questions

Exams that ask this topic