Question bank › Math
Dsa Math Medium

Mean and Median of a List

Given a list of integers, calculate the mean and median of the numbers. Print the mean followed by the median, each formatted to two decimal places. ### Input Format: A single line containing space-separated integers (1 <= len <= 10^5, -10^6 <= x <= 10^6). ### Output Format: Two decimal numbers: the mean and median, separated by a space. ### Example: Input: 1 2 3 4 5 Output: 3.00 3.00

Key concepts

mathstatisticssorting

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.