NeetCode #412LC-364MediumTrees
← Back to All Problems

#412 · #364 · Nested List Weight Sum II(嵌套列表加权和 II)

📌 Problem Statement & Constraints

This is an interactive problem. You are given a nested list of integers where each element is an integer or a list. Return the sum of every integer multiplied by its weight, where the weight is maxDepth - depth + 1 (the outermost level has the largest weight). Constraints: the total number of integers is at most 50; the nesting depth is at most 50.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!