Question DSA-GRDY-0017
HardWhich property must a problem have for a greedy algorithm to be correct?
- A.
The greedy-choice property and optimal substructure
- B.
It must use sorting
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Greedy question
Which property must a problem have for a greedy algorithm to be correct?
The greedy-choice property and optimal substructure
It must use sorting
Sign up free to see the answer and a step-by-step explanation.
Overlapping subproblems only
It must be NP-complete