@iPractice Hmm, I don't like the ... ? ... : () abuse. And I don't see what it has to do with mine, as mine is about not using a depth variable, about not determining the depth first.
Your BFS btw is very inefficient.
Nested List Weight Sum II
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.