Implement top-K over a stream | Coinbase Interview Question