Maximize points by deleting numbers and their neighbors with a classic DP strategy.
Constraints
Example
```python >>> delete_and_earn([3, 4, 2]) 6 >>> delete_and_earn([2, 2, 3, 3, 3, 4]) 9 >>> delete_and_earn([5]) 5 >>> delete_and_earn([0, 0]) 0 ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints