All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2024

Which of the following algorithms are based on Breadth First Search (BFS)?
A. Prim's algorithm
B. Kruskal's algorithm
C. Dijkstra's algorithm
D. Greedy algorithms
E. Dynamic Programming
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: D. A & C only

Explanation

Prim's and Dijkstra's algorithms grow a tree outward from a source vertex level by level, like BFS with a priority queue instead of a FIFO queue. Kruskal's works on sorted edges, and greedy/DP are general strategies.

More Data Structures and Algorithms questions