Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Sum comprehension in lambda function solution in Clear category for Count Inversions by Phil15
count_inversion = lambda s: sum(s[i] > s[j]
for i in range(len(s)-1)
for j in range(i+1, len(s)))
April 6, 2018