<p>Given an integer array <code>nums</code>, your goal is to make all elements in <code>nums</code> equal. To complete one operation, follow these steps:</p>
<ol>
<li>Find the <strong>largest</strong> value in <code>nums</code>. Let its index be <code>i</code> (<strong>0-indexed</strong>) and its value be <code>largest</code>. If there are multiple elements with the largest value, pick the smallest <code>i</code>.</li>
<li>Find the <strong>next largest</strong> value in <code>nums</code><strong>strictly smaller</strong> than <code>largest</code>. Let its value be <code>nextLargest</code>.</li>
<li>Reduce <code>nums[i]</code> to <code>nextLargest</code>.</li>
</ol>
<p>Return <em>the number of operations to make all elements in </em><code>nums</code><em> equal</em>.</p>