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 the Breadth First Search (BFS) ?

A. Prim's algorithms

B. Kruskal algorithms

C. Dijkstra algorithms

D. Greedy algorithms

E. Dynamic Programming

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 frontier outward from a source, generalizing BFS with a priority queue. Kruskal sorts edges, and 'greedy' and 'dynamic programming' are design strategies, not BFS-based algorithms.

More Data Structures and Algorithms questions