Description
Solutions
Maximize Points 🐳 -- Not OA but an INTERVIEW Question! 🌷 :)
🤘 INTERN

Given an array, each value at each index represents points. If you "take" the points at value v, you can't take the points in the next v indices. Maximize the amount of points you can take.

𓇼 ⋆.˚ 𓆝Endless thanks to Rachel! 𓆡⋆.˚ 𓇼

Example 1:

Input:  points = [25, 1, 3, 99, 4]
Output: 100
Explanation:

Take 1 and 99, the solution is 100.

Constraints:
    🍅
Thumbnail 0

Testcase

Result
Case 1

input:

output: