Question 1
EasyWhat is a greedy algorithm?
- A.
One that uses a lot of memory
- B.
One that makes the locally best choice at each step, hoping for a global optimum
- C.
One that tries every possibility
- D.
One that always uses recursion
Show answer and explanation
Answer: B
Greedy works only for problems with the greedy-choice property and optimal substructure.