MinStack, MaxStack and Streaming Median
Asked at ByteDance · Coding Questions · Difficulty: Hard · Last asked Jan 30, 2026
Three linked structures in one MLE round: `MinStack` with O(1) min, `MaxStack`, and a streaming-median follow-up (two heaps), then how to retrofit MaxStack to maintain running median.
Loading the problem…
More ByteDance interview questions
- Project Deep Dive (Resume Drill)
- Video-Keyword Association Review System
- Realtime Auction Bidding System
- MLE Oral Fundamentals: Dropout, Overfitting, Normalization, Loss Functions
- Content Moderation System Design
- ML System Design: Dynamic K in Retrieval Stage