Marathon Checkpoint Streak Finder
Marathon Checkpoint Streak Finder
MediumArrays100% accepted
Meera manages Mumbai Marathon's health monitoring team, tracking participant completion at 5 checkpoints. She needs to find which checkpoint has the longest consecutive finisher streak.
Approach
Given a 2D array where each row is a checkpoint and each column is a participant (1=completed, 0=quit), find the checkpoint with the longest consecutive sequence of 1s.
Input
checkpoints=[[1,1,1,0],[0,1,1,1],[1,1,0,1]]
Output
1
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