Skip to content

Commit 70c46a2

Browse files
authored
Add spaces after control flow statements.
Adding spaces.
1 parent a4bd1ce commit 70c46a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

javascript/0988-smallest-string-starting-from-leaf.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ var smallestFromLeaf = function(root) {
2323

2424
const char = String.fromCharCode(node.val+97);
2525

26-
if(!node.left && !node.right) {
26+
if (!node.left && !node.right) {
2727
str.push(char);
2828
const str1 = str.slice(0).reverse().join("");
29-
if(str1 < smallest) {
29+
if (str1 < smallest) {
3030
smallest = str1;
3131
}
3232
str.pop();
3333
return;
3434

3535
}
3636

37-
if(node.left) {
37+
if (node.left) {
3838
str.push(char);
3939
dfs(node.left, str);
4040
str.pop();
4141
}
4242

43-
if(node.right) {
43+
if (node.right) {
4444
str.push(char);
4545
dfs(node.right, str);
4646
str.pop();

0 commit comments

Comments
 (0)