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

Deploy Streaming Window Anomaly

DevOps / SRE Engineer signal: sliding window + frequency map in a rolling deploy planner context. This is a ProdMatch-owned devops sre drill, framed as a March 2026 Stripe Release Platform simulation, not a copied platform question.

Company context

Stripe · Release Platform

Freshness

March 2026

Product surface

rolling deploy planner

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

Question

For rolling deploy planner, process a timestamp-ordered stream of pods. 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 AnomalyhardCapacity Streaming Window AnomalyhardBlast Streaming Window Anomalyhard