Authentication Failure Gap Analysis
Authentication Failure Gap Analysis
HardArrays0% accepted
A bank in Mumbai tracks Aadhaar authentication attempts. Arjun analyzes logs finding gaps between successful authentications. He needs the largest gap (max consecutive failures) to trigger enhanced security protocols.
Approach
Given an array of authentication results (1=success, 0=failure), find the maximum number of consecutive 0s.
Input
log=[1,0,0,1,0,0,0,1,0]
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