karatsuba code formatting
inversions in a sequence