Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Count Inversions by saklar13
count_inversion = lambda s: sum(sum(x>y for y in s[i+1:]) for i,x in enumerate(s))
Dec. 23, 2014
Comments: