Amazon's real-time monitoring systems compute running medians over data streams. The two-heap technique (max-heap for lower half, min-heap for upper half) gives you insert and median. You balance the heaps after every insertion so their sizes differ by at most .
Solve it on LeetCode, then check your approach in the full walkthrough. This pattern shows up whenever you need order statistics from streaming data.