Question 35

Computer Awareness Data Structure Medium

Which of the following standard algorithms is not a greedy algorithm?

(A) Prim's algorithm
(B) Kruskal algorithm
(C) Dijkstra's shortest path algorithm
(D) Bellman-Food shortest path algorithm
✓ Correct Answer: Option D Verified Solution

📘 Step-by-Step Solution & Detailed Explanation:

The Bellman-Ford shortest path algorithm is not a greedy algorithm. Unlike greedy algorithms, it uses iterative relaxation and can handle graphs with negative weights. \[\] \[\] Correct Option: (d)

Practice Similar Data Structure Questions

Reinforce your conceptual grasp with related questions from CUET-MCA 2021:

Q54 Which of these operators is used to allocate memory to array variable in...
Solve →
Q56 Consider the following function implemented in C \[\] void test fun(int x,...
Solve →
Q66 What happens if the following program is executed in C and C++? \[\]int...
Solve →
Q69 What is the output of this C code? \[\]void main() \[\]int x = 18;...
Solve →
Q73 The minimum number of functions should be present in a ( C++ ) program for...
Solve →
Full-Length Test Series

Prepare for CUET-MCA Under Real Exam Conditions

Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.

Start Free Mock Test Series →