Find Kth Maximum from Infinite Stream
Filed under Amagi
The question
Design a system with two functions: f1 accepts an infinite number of integers and calls f2. f2 must create a data structure and return the kth maximum of all numbers, where k is revealed in f2.
No write-up yet. Related questions below have one.
Related Amagi questions
Collected from public candidate posts and coding forums. Updated Nov 2026.