Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- whose elements may also be integers or other lists.
* A recursive function to calculate the sum of all integers from 1 to n. * @param n The last number in the range to sum. * @return The sum of all integers from 1 to n. This Java code defines a class ...