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.
A reverse pair is defined as a pair of indexes
nums.length, and
nums[i] nums[j].
Constraints:
nums.length
nums[i]
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.
A reverse pair is defined as a pair of indexes
nums.length, and
nums[i] nums[j].
Constraints:
nums.length
nums[i]