Problem Link: DIFFMED Problem - CodeChef
Feedback
median example given in problem statement is confusing… median of 3,1,2 should be 1 and median of 3,4,1,2 should be (4+1)/2 = 2.5 no? Can u give me an explanation if u dont mind pls?
Problem Link: DIFFMED Problem - CodeChef
median example given in problem statement is confusing… median of 3,1,2 should be 1 and median of 3,4,1,2 should be (4+1)/2 = 2.5 no? Can u give me an explanation if u dont mind pls?
@akhon
We always check for the median after sorting the array like for 3 1 2 when u sort it it will become 1 2 3 thus the median would be 2 .