Amazon·Software Engineer·Online Assessment (OA)
- Design a class that tracks a stream of integers and can return the Kth largest element at any point after each new number is added.
“I knew a min-heap of size k was the right move but I fumbled explaining why you'd keep the smallest of the top-k values at the root.”