Tell me about an algorithm question that involved recursion and how you solved it.
For this exercise, demonstrate the approach by implementing recursive_sum(nums), which recursively returns the sum of all integers in nums.
Function: def recursive_sum(nums):
Input: A list of integers. Output: One integer sum.
Examples: nums = [1, 2, 3, 4] returns 10; nums = [] returns 0.
Constraints: 0 <= len(nums) <= 1000; values range from -10^4 to 10^4.
def recursive_sum(nums):