Update medium_of_two_sorted_array