Back to Questions

Reverse Pairs

112.5K viewsAsked at LinkedIn
Hard

Question Explain

Given an array `nums`, return the number of 'reverse pairs' where $i < j$ and $nums[i] > 2 \cdot nums[j]$. This requires a modified Merge Sort approach.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question