Running Median

Talk it through out loud with your AI coach.

The problem

  • hard
  • Pro

Numbers arrive one at a time, and at any moment you must be able to report the median of everything seen so far. Explain a design that keeps each step fast.