Which of the following algorithms use the Greedy strategy?
A. Dijkstra's algorithm
B. Kruskal's algorithm
C. Huffman coding
D. Bellman-Ford algorithm
Choose the correct answer from the options given below:
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. A, B and C Only
Explanation
Dijkstra, Kruskal and Huffman coding all make the locally best choice at each step (greedy). Bellman-Ford relaxes all edges repeatedly and is a dynamic-programming algorithm.More Data Structures and Algorithms questions
- The longest common subsequence of {1,2,3,2,4,1,2} and {2,4,3,1,2,1} is
- Match List I (Hashing Collision Handling Method) with List II (Strategy)List I List II A. Chaining I. Check next slot B. Linear Probing II.…
- Maintaining a graph in memory by means of its adjacency matrix is known as
- Match List I with List IIList I List II A. Circular Queue I. Print Queue B. Priority Queue II. CPU Scheduling C. Double Ended Queue III. Di…
- The tight asymptotic bound for the recurrence T(n) = 2T(n/4) + √n is
- When developing a dynamic programming algorithm, the sequence of steps followed is: A. Construct an optimal solution from computed informat…