Longest Streak of SLA-Compliant Days in Managed Services
Last updated: November 29, 2026
Quick Overview
Given a list of daily SLA compliance percentages for a managed-services contract (None for days with missing data) and a target threshold, return the length and start index of the longest run of consecutive compliant days.
Accenture
November 29, 20260
0
0 solved
Given a list of daily SLA compliance percentages for a managed-services contract (None for days with missing data) and a target threshold, return the length and start index of the longest run of consecutive compliant days.
Accenture runs large managed-operations contracts where SLA reporting drives penalties and renewals, so a short array problem framed around compliance fits its assessment style. The interviewer checks a clean single pass, correct handling of missing data and tie-breaking.
What the Interviewer Expects
- Clarifies whether missing data breaks a streak
- Uses a single linear pass with current and best counters
- Returns the earliest streak on ties and says so
- Handles the no-compliant-days case explicitly
- Avoids off-by-one errors on the start index
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you allow at most one non-compliant day inside a streak?
- What if the data arrives as a stream and you must report the current best at any time?
- How would you compute this per client in SQL?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: days list of floats or None, and target. A day is compliant if it has data and pct >= target. Missing data counts as non-compliant (conservative for SLA reporting; I would confirm). Outpu...
High-Level Design
Scan left to right keeping cur (length of the current run) and start (where it began). When a compliant day extends the run, compare with best. A non-compliant day resets cur. Updating best ...