Given an integer array nums, return the sum of all its elements. You must compute the sum recursively, without using loops.
Input: An integer array nums.
Output: Return an integer equal to the sum of all elements.
Input: [1,2,3,4,5]
Output: 15
Explanation: 1+2+3+4+5 = 15.Input: [-1,-2,-3]
Output: -6
Explanation: Sum of negatives is negative.Input: [7]
Output: 7
Explanation: Single element.1 <= nums.length <= 10^4-10^9 <= nums[i] <= 10^9Sum fits in 64-bit integer