Kth Largest in a Stream

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

Numbers arrive one at a time, and after each one you must report the kth largest number seen so far. Explain which structure you'd keep and why.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →