MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / inversions.py

File inversions.py

divide_and_conquer/inversions.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2Given an array-like data structure A[1..n], how many pairs
3(i, j) for all 1 <= i < j <= n such that A[i] > A[j]? These pairs are
4called inversions. Counting the number of such inversions in an array-like

Callers

nothing calls this directly

Calls 1

mainFunction · 0.70

Tested by

no test coverage detected