ByteDance interview question

Reverse pairs on LeetCode (difficulty: hard)