This System Design question evaluates understanding of streaming data processing, quantile estimation, and the design of memory-constrained services that must trade off accuracy, latency, memory, and I/O.
You are building a service that consumes a very large or unbounded stream of numeric values and must continuously report:
The classic two-heap (max-heap for lower half, min-heap for upper half) approach requires storing all seen values and therefore exceeds memory when the stream is very large.
State any minimal assumptions you make (e.g., numeric domain, tolerance for approximation, latency SLOs).
Login required