ProdMatch
CompaniesCitiesRolesSign in

Companies

  • Google
  • Microsoft
  • Meta
  • Amazon
  • Apple
  • Atlassian
  • Nvidia
  • Oracle
  • See all 51 →

Cities

  • Bengaluru jobs
  • Hyderabad jobs
  • Pune jobs
  • Gurugram jobs
  • Noida jobs
  • Delhi NCR jobs
  • Mumbai jobs
  • Chennai jobs
  • Remote-India jobs

Roles

  • QA / SDET Engineers
  • Backend Engineers
  • Frontend Engineers
  • Full-stack Engineers
  • Data Analysts
  • Data Engineers
  • ML / AI Engineers
  • DevOps / SRE Engineers
  • All roles →

ProdMatch

  • About
  • Career guides
  • Compare
  • Salaries
  • Skills
  • DSA practice
  • Privacy
  • Terms
  • Sign in

© 2026 ProdMatch.ai · Built for India · DPDP Act 2023 compliant · Job data sourced from official company career pages.

Back to DSA
Sliding Windowhard70 minDevOps / SRE Engineer

SLO Streaming Window Anomaly

DevOps / SRE Engineer signal: sliding window + frequency map in a SLO burn-rate monitor context. This is a ProdMatch-owned devops sre drill, framed as a April 2026 MoEngage Reliability Platform simulation, not a copied platform question.

Company context

MoEngage · Reliability Platform

Freshness

April 2026

Product surface

SLO burn-rate monitor

ProdMatch interview simulation based on product-team patterns; not a claim of a real company question.

Question

For SLO burn-rate monitor, process a timestamp-ordered stream of windows. Find the longest contiguous window where at most k distinct risk labels appear and the total severity stays under budget.

Input

  • Array of events {label, severity} and integers k, budget.

Output

  • Maximum window length satisfying both constraints.

Constraints

  • 1 <= events.length <= 300000
  • 1 <= k <= 50
  • Severity values are positive integers.

Concepts

  • blast-radius graphs
  • alert dedupe
  • rolling windows
  • sliding window
  • frequency map
  • stream processing

labels: A,B,A,C with k=2 and budget=7 -> longest valid window length is 3

Approach

Try framing your own approach first. The 30 seconds you think before peeking is where learning happens.

Clean Solution

Reveal the approach first.

How well did you understand?

Your rating tunes when this problem shows up again.

Common Mistakes

  • Update the answer only after the window is valid.
  • Avoid recomputing the whole window on every move.

Next Similar Problems

Incident Streaming Window AnomalyhardDeploy Streaming Window AnomalyhardCapacity Streaming Window Anomalyhard