in reply to how to find median value
So just sort the list and then determine which answer to give using the modulo operator %.
Note that some authors consider the median of a list with an even number of elements to be the arithmetic mean of locations n/2-1 and n/2.
|
|---|