Loading interview...

The Middle Ground

A hard Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.

Domain
Python
Difficulty
hard
Seniority
senior

Interview Prompt

The monitoring pipeline ingests latency samples one at a time, and the alerting system needs the current median at any point to detect drift. Sorting the entire history on every query is too slow. Build a class that accepts numbers one at a time and returns the running median efficiently. For an even count, return the average of the two middle values. Querying before any data is added should raise a ValueError.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your python solution with real code execution
  4. Get instant feedback and a hire/no-hire decision