The median of a list of numbers is essentially its middle element after sorting. The same number of elements occur after it as before. Given a list of numbers with an odd number of elements, find the median?
The sorted array . The middle element and the median is .
Complete the findMedian function in the editor below.
findMedian has the following parameter(s):
int arr[n]: an unsorted array of integers
int: the median of the array
The first line contains the integer , the size of .
The second line contains space-separated integers