Consecutive Merit Score Bracket
Consecutive Merit Score Bracket
HardArrays100% accepted
The NSP (National Scholarship Portal) in Delhi allocates scholarships to students with merit scores in range [L,R]. Priya finds the longest sequence of consecutive scores within bracket for equitable scholarship distribution.
Approach
Given an array of merit scores, find the longest contiguous subarray where all scores fall within range [L,R].
Input
scores=[60,65,70,55,75,80,78] L=65 R=80
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