Update median of two sorted array