<p>Given an array of integers <code>nums</code>, calculate the <strong>pivot index</strong> of this array.</p>
<p>The <strong>pivot index</strong> is the index where the sum of all the numbers <strong>strictly</strong> to the left of the index is equal to the sum of all the numbers <strong>strictly</strong> to the index's right.</p>
<p>If the index is on the left edge of the array, then the left sum is <code>0</code> because there are no elements to the left. This also applies to the right edge of the array.</p>
<p><strong>Note:</strong> This question is the same as 1991: <ahref="https://leetcode.com/problems/find-the-middle-index-in-array/"target="_blank">https://leetcode.com/problems/find-the-middle-index-in-array/</a></p>