Find Pivot Index
Example 1: Input: nums = Output: 3 Explanation: The pivot index is 3. Left sum = nums + nums + nums = 1 + 7 + 3 = 11 Right…
VICKY CHHETRI
Example 1: Input: nums = Output: 3 Explanation: The pivot index is 3. Left sum = nums + nums + nums = 1 + 7 + 3 = 11 Right…
Return the running sum of nums. Input: nums = Output: Explanation: Running sum is obtained as follows: .