Oracle | Coding Round | Maximum Rating Sum: Implementing Kadane Algorithm
Oracle · Question · Posted Apr 2026
Problem Statement: Maximum Rating Sum The Scenario: Ryan is a movie enthusiast who has collected a list of movie quality ratings. He wants to find a contiguous sequence of movies that yields the highest possible cumulative rating. Task: Given an array of integers arr, calculate the maximum possible sum of any contiguous subarray. Example: Input: arr = [-1, 3, 4, -2, 5, -7] Analysis: Subarray arr[1] to arr[4] is [3, 4, -2, 5]. Cumulative Sum: 3+4+(−2)+5=10. Expected Output: 10
The full answer & interview discussion are available to premium members.
Log in Create a free account