← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given a nested list of integers, return the sum of all integers weighted by their depth. Unlike the original problem, the weight increases from bottom up: integers at the deepest level have weight 1, and the weight increases as you go up.