Answer:
Explanation:
Let's do this in python. We can start with assuming 2 inputs, 1 is the sorted arrays of numbers, and the 2nd is the integer indicating the size of the array.
We'll start out by determining if the size is odd or even
def find_median(array_numbers, array_size):
if array_size % 2 == 1: # odd number
median_position = (array_size - 1) / 2
return array_numbers[median_position]
else: # even number
median_positions = array_size / 2
return (array_numbers[median_position] + array_numbers[median_position - 1])/2