Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Count Inversions by TovarischZhukov
def count_inversion(data):
return len([1 for i, elem in enumerate(data) for val in data[:i] if val> elem])
Dec. 2, 2015