Update Median of sorted array