<p>You are given a <strong>0-indexed</strong> integer array <code>nums</code>. In one operation, you may do the following:</p>
<ul>
<li>Choose <strong>two</strong> integers in <code>nums</code> that are <strong>equal</strong>.</li>
<li>Remove both integers from <code>nums</code>, forming a <strong>pair</strong>.</li>
</ul>
<p>The operation is done on <code>nums</code> as many times as possible.</p>
<p>Return <em>a <strong>0-indexed</strong> integer array </em><code>answer</code><em> of size </em><code>2</code><em> where </em><code>answer[0]</code><em> is the number of pairs that are formed and </em><code>answer[1]</code><em> is the number of leftover integers in </em><code>nums</code><em> after doing the operation as many times as possible</em>.</p>