Skip to main content

Practice · 1 of 1

Median With Tests

CHALLENGE
Difficulty: beginner+25 XP

Implement median(v) (middle of sorted copy; average of two middles for even size; 0.0 for empty — no exception). Tests cover odd, even, empty, single, and unsorted input.

Back to lesson: Practice: Testing Practice: Red-Green Discipline