Problem Β· Array

Maximize Points 🐳 -- Not OA but an INTERVIEW Question! 🌷 :)

● MediumGoogleINTERNOA
See Google hiring insights

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! 𓆑⋆.˚ 𓇼

Examples
01 Β· Example 1
points = [25, 1, 3, 99, 4]
return = 100

Take 1 and 99, the solution is 100.

Constraints
πŸ…
More Google problems
drafts saved locally
public int maximizePoints(int[] points) {
  // write your code here
}
points[25, 1, 3, 99, 4]
expected100
checking account