Match List I with List II.
Choose the correct answer from the options given below:
| List I | List II |
|---|---|
| a. Dijkstra's algorithm | I. Calculates path matrix |
| b. Prim's algorithm | II. Stores minimum cost edge |
| c. Warshall's algorithm | III. Stores the total cost from a source node to the current node |
| d. Kruskal's algorithm | IV. Finds minimum spanning tree |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. a-III, b-II, c-I, d-IV
Explanation
Dijkstra keeps the total cost from the source; Prim stores the minimum-cost edge to the tree; Warshall computes the path matrix; Kruskal finds an MST.More Data Structures and Algorithms questions
- For the weighted graph below, which of the following orders of adding edges can NOT be produced by a minimum spanning tree algorithm? Edges…
- Statement I: Given a graph G = (V, E) in which each vertex v ∈ V has an associated positive weight w(v), we can use linear programming to f…
- Assume that f(n), g(n) and h(n) are asymptotically positive. Which of the following is correct?
- The solution of the recurrence relation T(n) = 3T(n/4) + n log n is
- The number of nodes of height h in any n-element heap is at most
- Consider a B-tree of height h and minimum degree t ≥ 2 that contains n keys, n ≥ 1. Which of the following is correct?