← Questions

Delete and earn

0
MicrosoftCodingLast asked Aug 2026

Taking a value x from the array earns x points but deletes every x - 1 and x + 1. Return the most points you can earn. Explain how this reduces to the house robber recurrence over values.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding