Skip to main content

Practice ยท 1 of 1

Median With Tests

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.

Difficulty: beginner

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