Loading...

The Halftime Score

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
mid

Problem

Our metrics service can't depend on external libraries in the edge deployment. Write a function called compute_median that takes a list of numbers and returns the median value. For even-length lists, return the average of the two center values. No built-in statistics functions allowed.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.