You are given an integer array, nums. Your task is to count how many reverse pairs exist in the array and return the total number of such pairs.
nums
A reverse pair is defined as a pair of indexes (i,j)(i, j)(i,j) such that:
0≤i<j<0 \leq i \lt j \lt0≤i<j< nums.length, and
nums.length
nums[i] >2×\gt 2 \times>2× nums[j].
nums[i]
nums[j]
Constraints:
1≤1 \leq ...