Skip to content

Commit 22559fb

Browse files
authored
Fixed Spacing
1 parent 52335ae commit 22559fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/0515-find-largest-value-in-each-tree-row.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
*/
1616
var largestValues = function(root) {
1717

18-
if(!root) return [];
18+
if (!root) return [];
1919
const result = [];
2020

2121
const bfs = (root) => {
2222
const queue = new Queue();
2323
queue.enqueue(root);
2424

25-
while(!queue.isEmpty()) {
25+
while (!queue.isEmpty()) {
2626
let nodesCount = queue.size();
2727
let max = -Infinity;
28-
while(nodesCount) {
28+
while (nodesCount) {
2929
const node = queue.dequeue();
3030
max = Math.max(max, node.val);
31-
if(node.left) queue.enqueue(node.left);
32-
if(node.right) queue.enqueue(node.right);
31+
if (node.left) queue.enqueue(node.left);
32+
if (node.right) queue.enqueue(node.right);
3333
nodesCount--;
3434
}
3535
result.push(max);

0 commit comments

Comments
 (0)