elementSum to 0 to store the sum of elements in nums.digitSum to 0 to store the sum of digits of elements in nums.nums:
a. Add the number to elementSum.
b. While the number is greater than 0:
i. Add the last digit (number % 10) to digitSum.
ii. Remove the last digit from the number (number / 10).elementSum and digitSum.