Maximize Points π³ -- Not OA but an INTERVIEW Question! π· :)
Updated
Problem statement
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.
Function
maximizePoints(points: int[]) β intExamples
Example 1
points = [25, 1, 3, 99, 4]return = 100Take 1 and 99, the solution is 100.
Constraints
π
More Google interview questions
- Route Pattern MatcherPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
- Minimum Operations to Make a SubsequenceOA Β· Seen Nov 2026
- Periodic-Color Binary Forest RootsPHONE SCREEN Β· Seen Nov 2026
- Evaluate a Nested Math ExpressionPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
- Distinct Subset SumsONSITE INTERVIEW Β· Seen Nov 2026
- Playlist With No Same Artist in a RowONSITE INTERVIEW Β· Seen Nov 2026
- Best Stock Trade with Buy and Sell DaysPHONE SCREEN Β· Seen Nov 2026
- Word Chain Jumps in a GridPHONE SCREEN Β· Seen Nov 2026
- Delete Nodes and Return Forest RootsONSITE INTERVIEW Β· Seen Nov 2026
- Dice-Walk Winning ProbabilityPHONE SCREEN Β· ONSITE INTERVIEW Β· Seen Nov 2026
Similar questions at other companies
- Card Game: Best First-Player ScoreShopify Β· OAShopify interview questions
- Maximum Game Score with Fixed Forward JumpsStripe Β· OAStripe interview questions
- 0/1 KnapsackConfluent Β· OAConfluent interview questions
- Minimum Cost to Tile a Strip with Widths 1, 2, and 3Infosys Β· OAInfosys interview questions
- Maximum Escape Game ScoreMicrosoft Β· OAMicrosoft interview questions
- Maximum Subarray SumStraive Β· OA
- Longest Increasing Price SubsequenceOpenAI Β· OAOpenAI interview questions
- Lowest-Cost Shirt Color ScheduleElevenLabs Β· OAElevenLabs interview questions
- Maximum Game Board ScoreJP Morgan Chase Β· OAJP Morgan Chase interview questions
- API Bandwidth AllocationArista Networks Β· OAArista Networks interview questions