LinkedIn·Mobile Engineer·Technical Phone Screen
- Given a nested list of integers where each element can be an integer or another nested list, compute a weighted sum where each integer's weight is (maxDepth - depth + 1). Deeper integers get lower weight.
“I initially coded the straightforward version where deeper elements get more weight, which is the classic problem.”