<p>For an integer array <code>nums</code>, an <strong>inverse pair</strong> is a pair of integers <code>[i, j]</code> where <code>0 <= i < j < nums.length</code> and <code>nums[i] > nums[j]</code>.</p>
<p>Given two integers n and k, return the number of different arrays consist of numbers from <code>1</code> to <code>n</code> such that there are exactly <code>k</code><strong>inverse pairs</strong>. Since the answer can be huge, return it <strong>modulo</strong><code>10<sup>9</sup> + 7</code>.</p>