All mock tests are FREE till 31 December — register to save your progress

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