Skip to content

Commit 4bd1571

Browse files
committed
Time: 15 ms (45.99%), Space: 15.7 MB (15.31%) - LeetHub
1 parent 198734f commit 4bd1571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

0429-n-ary-tree-level-order-traversal/0429-n-ary-tree-level-order-traversal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Solution {
3333
q.pop();
3434
level.push_back(cur->val);
3535
for (auto& child : cur->children) {
36-
if (child) q.push(child);
36+
q.push(child);
3737
}
3838
}
3939
ans.push_back(level);

0 commit comments

Comments
 (0)