Solar Panel High-Efficiency Streak Analyzer
Solar Panel High-Efficiency Streak Analyzer
MediumArrays0% accepted
Ravi monitors Pune building solar panels hourly. To optimize energy contracts, he tracks periods when efficiency exceeds 70%. Given hourly efficiency percentages, find the longest consecutive hours above 70% threshold.
Approach
Given array of hourly solar panel efficiency percentages, find the longest consecutive subarray with all values strictly greater than 70.
Input
8
65 75 80 85 65 72 78 82
Output
3
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