<p>You are given a <strong>0-indexed</strong> integer array <code>nums</code>.<strong></strong>You are also given an integer <code>key</code>, which is present in <code>nums</code>.</p>
<p>For every unique integer <code>target</code> in <code>nums</code>, <strong>count</strong> the number of times <code>target</code> immediately follows an occurrence of <code>key</code> in <code>nums</code>. In other words, count the number of indices <code>i</code> such that:</p>
<ul>
<li><code>0 <= i <= nums.length - 2</code>,</li>
<li><code>nums[i] == key</code> and,</li>
<li><code>nums[i + 1] == target</code>.</li>
</ul>
<p>Return <em>the </em><code>target</code><em> with the <strong>maximum</strong> count</em>. The test cases will be generated such that the <code>target</code> with maximum count is unique.</p>