<p>Given a <strong>zero-based permutation</strong><code>nums</code> (<strong>0-indexed</strong>), build an array <code>ans</code> of the <strong>same length</strong> where <code>ans[i] = nums[nums[i]]</code> for each <code>0 <= i < nums.length</code> and return it.</p>
<p>A <strong>zero-based permutation</strong><code>nums</code> is an array of <strong>distinct</strong> integers from <code>0</code> to <code>nums.length - 1</code> (<strong>inclusive</strong>).</p>