Implemented inversion algorithm with mergesort technique