commit
ef5be89984
|
|
@ -460,7 +460,7 @@ var levelOrder = function (root) {
|
|||
for (let i = 0; i < n; i++) {
|
||||
let node = queue.shift();
|
||||
temp.push(node.val);
|
||||
node.left &&queue.push(node.left);
|
||||
node.left && queue.push(node.left);
|
||||
node.right && queue.push(node.right);
|
||||
}
|
||||
res.push(temp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue