divide-conquer for Inversion Num