Greedy algorithms are typically fast:
Sorting: time
Single pass through data:
Total: in most cases Compare this to brute force () or DP ( or ). Greedy is often the fastest correct solution when it works. Space is usually extra (beyond input), since you build the answer incrementally without storing subproblem results. Greedy is fast because you make one decision per item and never revisit. DP reconsiders past choices, which takes longer but handles more problems.