merge sorted list (inplace)