I have conditions where inversion is a pair i < j such that xi > 2 xj in a given list of numbers x1, …, xn with O(n log n) complexity, my below python code works where xi