Skip to content
Embercode
✕
Advanced graphsQuick quiz

Shortest path choices

8 questions. Covers Shortest paths: Dijkstra, 0-1 BFS and Floyd-Warshall.

Questions 1 to 5 of 8

  1. 1. You need the distance from one source to every vertex. There are up to 200000 vertices and 200000 edges, and each weight is an integer from 0 to 10^9. Which method fits?
  2. 2. Your graph has only weights 0 and 1, one source and 200000 vertices. An AI tool wrote the solution with Dijkstra and a heap. What is the best answer?
  3. 3. How many inner-loop steps does Floyd-Warshall take on a graph with n = 400 vertices? Count one step for each triple (k, i, j), with k, i and j each running from 0 to n - 1.

    Type a number.

  4. 4. Which statements about lazy deletion in Dijkstra are true? Choose all that apply.

    Pick every answer that is true.

  5. 5. An AI tool writes Dijkstra for a road map where one edge has weight -3, and says the answers are correct. Which reply is right?

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.