Greedy vs dynamic programming — what’s the key difference? | LetsGit.IT