What is the median of the following list of numbers
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
With 4040 entries the median averages the 2020th and 2021st; exactly m + 44 entries are at most m (for m near 2000), so m = 1976.
Solution
With entries, the median is the average of the th and st smallest.
For an integer , the entries that are at most are the integers together with the perfect squares up to , namely of them. Since , for this count is .
We want , so . Thus exactly entries are , and the th smallest entry is itself. The next entry is (not a square, so it appears once), which is the st.
Median .
The answer is .
Why this works
To locate the -th smallest element of a merged list, count how many entries lie at or below a threshold and adjust the threshold until the count hits . Here the squares below are few (), so they merely push the median down from the halfway point by .
Alternative approach
Estimate first: without the squares, the th and st entries would be and ; the small squares each displace the median one position down, landing near . Then confirm and are not squares.
The trap
Using 45 squares instead of 44 (since 45^2 = 2025 > 2020), which shifts the answer to 1975.5.
Common mistakes
- Using 45 squares instead of 44 (since 45^2 = 2025 > 2020), which shifts the answer to 1975.5.
- Taking the median as the single th entry instead of averaging two middle entries, or forgetting that the squares duplicate values already in the list.
Techniques
Bound the quantity above/below or estimate to pin it down · Set up the equation/formula and compute; no special trick needed