Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Count Inversions by gyahun_dash
import itertools as it
def count_inversion(sequence):
return sum(x > y for x, y in it.combinations(sequence, 2))
Sept. 3, 2014
Comments: