PythiloHard · 40 min · Task 89 of 100 · progress kept in this browser

Median of two sorted arrays

Return the median of two sorted numeric lists whose combined length is positive, using O(log(min(m,n)+1)) comparisons and constant extra space.

a, b = [1, 2], [3, 4]
left_values, right_values = [a[-1]], [b[0]]
print((max(left_values)+min(right_values))/2)
Your task

Return the median of two sorted numeric lists whose combined length is positive, using O(log(min(m,n)+1)) comparisons and constant extra space.