Inverse Depth Sum of a Nested Integer List

Given a nested integer list nestedList, where each element is either an integer or another nested list, compute its inverse depth weighted sum.

  • An integer at the outermost level has depth 1...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: