Update median of two sorted arrays