Peak Hour Load Tracking
Peak Hour Load Tracking
HardArrays0% accepted
BESCOM monitors household electricity consumption per hour in Bangalore. Arjun analyzes usage patterns to find the hour window with maximum total consumption for power distribution planning.
Approach
Given an array of hourly electricity consumption values, find the maximum sum of a contiguous subarray.
Input
consumption=[5,-3,5,2,-1,4,6]
Output
18
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards