LIC Policy Premium Payment Streak
LIC Policy Premium Payment Streak
EasyArrays0% accepted
Arjun submits an LIC insurance claim. The policy requires a minimum 24-month continuous premium payment record (no missed months). His payment history is an array: 1=paid, 0=missed. Check if he qualifies.
Approach
Given array of monthly payments (0/1) and required consecutive months K, verify if K consecutive 1s exist.
Input
payments=[1,1,1,1,0,1,1,1,1,1,1,1], K=8
Output
false
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