mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
15 lines
422 B
HTML
15 lines
422 B
HTML
|
<p>在数组中的两个数字,如果前面一个数字大于后面的数字,则这两个数字组成一个逆序对。输入一个数组,求出这个数组中的逆序对的总数。</p>
|
||
|
|
||
|
<p> </p>
|
||
|
|
||
|
<p><strong>示例 1:</strong></p>
|
||
|
|
||
|
<pre><strong>输入</strong>: [7,5,6,4]
|
||
|
<strong>输出</strong>: 5</pre>
|
||
|
|
||
|
<p> </p>
|
||
|
|
||
|
<p><strong>限制:</strong></p>
|
||
|
|
||
|
<p><code>0 <= 数组长度 <= 50000</code></p>
|