Problem
Maximize Movie Ratings With Skip Limit
Learn this problemProblem statement
You are given an integer array ratings, where ratings[i] is the rating of the i-th movie.
You may choose to watch or skip each movie, but you cannot skip two or more movies consecutively.
Return the maximum possible sum of watched movie ratings while respecting the skip constraint.
Function
maximizeMovieRatings(ratings: int[]) → intExamples
Example 1
ratings = [-3,2,4,-1,-2,-5]return = 4Constraints
1 <= ratings.length-1000 <= ratings[i] <= 1000
More Salesforce problems
- Minimize Total Input Cost (for LTMS)Seen Jun 2026
- Count Prime StringsONSITE INTERVIEW · Seen Jun 2026
- Final Pod Counts After LogsOA · Seen May 2026
- ATM Queue Exit OrderPHONE SCREEN · Seen May 2026
- Good Ways to Split an ArrayPHONE SCREEN · Seen May 2026
- Generate Seen Binary StringsOA · Seen May 2026
- Update Pod Counts From LogsOA · Seen May 2026
- Minimum Removals to Balance ArrayOA · Seen May 2026