Interpolation to find median