Single Choice Easy

QWhich of the following is a disadvantage of a greedy algorithm?

ID: #5736 Greedy Algorithms 673 views
Question Info
#5736Q ID
EasyDifficulty
Greedy AlgorithmsTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A It always guarantees the optimal solution
  • B It can be slow for large input sizes
  • C It requires a lot of memory
  • D It may not always find the globally optimal solution
Correct Answer

Explanation

Answer: It may not always find the globally optimal solution

Explanation: A greedy algorithm may not always find the globally optimal solution since it makes locally optimal choices at each step without considering the future consequences. This can lead to suboptimal solutions for some problems.

Share This Question

Challenge a friend or share with your study group.