Median means middle when the array is sorted so the numbers are in ascending order (taking average of two middle I case of even no. of elements).
E.g. What is the median of 2,6,2,8,7? When sorted, the numbers are 2,2,6,7,8, so the median is 6 (middle number).
(...