We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This appears to be the official solution too (see the editorial after you've solved the problem). I somehow don't see how it is in any way related to DP - it is a pure greedy algorithm, and even the official solution states so.
Candies
You are viewing a single comment's thread. Return to all comments →
This appears to be the official solution too (see the editorial after you've solved the problem). I somehow don't see how it is in any way related to DP - it is a pure greedy algorithm, and even the official solution states so.