summaryrefslogtreecommitdiff
path: root/progs/a240.py
blob: a5696ee2b6f7f50915f7fd87e89d998ec366f674 (plain)
1
2
3
4
5
6
7
def get_inv_count(arr, n): 
	inv_count = 0
	for i in range(n): 
		for j in range(i + 1, n): 
			if (arr[i] > arr[j]): 
				inv_count += 1
	return inv_count