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
Intervalshard70 minData Engineer

Partition Capacity Interval Planner

Data Engineer signal: line sweep + interval merge in a partition pruning context. This is a ProdMatch-owned data engineer drill, framed as a May 2026 Lenskart Lakehouse simulation, not a copied platform question.

Company context

Lenskart · Lakehouse

Freshness

May 2026

Product surface

partition pruning

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

Question

Plan capacity for partition pruning. Given reservation intervals with requested units, return the minimum capacity needed and all time ranges where capacity crosses a critical threshold.

Input

  • Intervals [start, end, units] and threshold.

Output

  • Peak capacity and merged high-pressure intervals.

Constraints

  • 1 <= intervals.length <= 200000
  • Intervals are half-open: [start, end).
  • Timestamps fit in signed 32-bit integers.

Concepts

  • stream windows
  • watermarks
  • lineage DAGs
  • line sweep
  • interval merge
  • capacity planning

[[1,4,3],[2,5,4]], threshold=6 -> peak=7, hot=[[2,4]]

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

  • Be explicit about whether touching endpoints overlap.
  • Process end events before start events for half-open intervals.

Next Similar Problems

Watermark Capacity Interval PlannerhardLineage Capacity Interval PlannerhardDedupe Capacity Interval Plannerhard