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
- Which of the following is the solution of the recurrence T(n) = T(2n/3) + 1?
- Match the LIST-I with LIST-II
- Arrange the following recurrence relations in increasing order of their time complexity: (A) T(n) = T(n/2) + 1 (B) T(n) = 2T(n/2) + n (C) T…
- Select the Sorting Algorithms that are stable. (A) Quick Sort (B) Bubble Sort (C) Insertion Sort (D) Merge Sort (E) Shell Sort
- Match List - I with List - II.
- Match List I (recurrence) with List II (complexity). List I: (A) T(n) = 2T(n/2) + n, (B) T(n) = T(n/2) + 1, (C) T(n) = 2T(n/2) + 1, (D) T(n…