Skip to content

Commit 78e9e70

Browse files
committed
chore: update
1 parent cbe1a37 commit 78e9e70

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

lcof2/剑指 Offer II 043. 往完全二叉树添加节点/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class CBTInserter {
301301
return;
302302
}
303303
const q: TreeNode[] = [root];
304-
while (q.length > 0) {
304+
while (q.length) {
305305
const t: TreeNode[] = [];
306306
for (const node of q) {
307307
this.tree.push(node);
@@ -355,7 +355,7 @@ var CBTInserter = function (root) {
355355
return;
356356
}
357357
const q = [root];
358-
while (q.length > 0) {
358+
while (q.length) {
359359
const t = [];
360360
for (const node of q) {
361361
this.tree.push(node);

lcof2/剑指 Offer II 043. 往完全二叉树添加节点/Solution.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CBTInserter {
2727
}
2828
}
2929
}
30-
30+
3131
int insert(int val) {
3232
auto p = tree[(tree.size() - 1) / 2];
3333
auto node = new TreeNode(val);
@@ -39,7 +39,7 @@ class CBTInserter {
3939
}
4040
return p->val;
4141
}
42-
42+
4343
TreeNode* get_root() {
4444
return tree[0];
4545
}

lcof2/剑指 Offer II 043. 往完全二叉树添加节点/Solution.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public CBTInserter(TreeNode root) {
3232
}
3333
}
3434
}
35-
35+
3636
public int insert(int val) {
3737
TreeNode p = tree.get((tree.size() - 1) / 2);
3838
TreeNode node = new TreeNode(val);
@@ -44,7 +44,7 @@ public int insert(int val) {
4444
}
4545
return p.val;
4646
}
47-
47+
4848
public TreeNode get_root() {
4949
return tree.get(0);
5050
}

lcof2/剑指 Offer II 043. 往完全二叉树添加节点/Solution.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var CBTInserter = function (root) {
1515
return;
1616
}
1717
const q = [root];
18-
while (q.length > 0) {
18+
while (q.length) {
1919
const t = [];
2020
for (const node of q) {
2121
this.tree.push(node);

lcof2/剑指 Offer II 043. 往完全二叉树添加节点/Solution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CBTInserter {
2020
return;
2121
}
2222
const q: TreeNode[] = [root];
23-
while (q.length > 0) {
23+
while (q.length) {
2424
const t: TreeNode[] = [];
2525
for (const node of q) {
2626
this.tree.push(node);

solution/0900-0999/0919.Complete Binary Tree Inserter/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ class CBTInserter {
308308
return;
309309
}
310310
const q: TreeNode[] = [root];
311-
while (q.length > 0) {
311+
while (q.length) {
312312
const t: TreeNode[] = [];
313313
for (const node of q) {
314314
this.tree.push(node);
@@ -362,7 +362,7 @@ var CBTInserter = function (root) {
362362
return;
363363
}
364364
const q = [root];
365-
while (q.length > 0) {
365+
while (q.length) {
366366
const t = [];
367367
for (const node of q) {
368368
this.tree.push(node);

solution/0900-0999/0919.Complete Binary Tree Inserter/README_EN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class CBTInserter {
301301
return;
302302
}
303303
const q: TreeNode[] = [root];
304-
while (q.length > 0) {
304+
while (q.length) {
305305
const t: TreeNode[] = [];
306306
for (const node of q) {
307307
this.tree.push(node);
@@ -355,7 +355,7 @@ var CBTInserter = function (root) {
355355
return;
356356
}
357357
const q = [root];
358-
while (q.length > 0) {
358+
while (q.length) {
359359
const t = [];
360360
for (const node of q) {
361361
this.tree.push(node);

solution/0900-0999/0919.Complete Binary Tree Inserter/Solution.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CBTInserter {
2727
}
2828
}
2929
}
30-
30+
3131
int insert(int val) {
3232
auto p = tree[(tree.size() - 1) / 2];
3333
auto node = new TreeNode(val);
@@ -39,7 +39,7 @@ class CBTInserter {
3939
}
4040
return p->val;
4141
}
42-
42+
4343
TreeNode* get_root() {
4444
return tree[0];
4545
}

solution/0900-0999/0919.Complete Binary Tree Inserter/Solution.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public CBTInserter(TreeNode root) {
3232
}
3333
}
3434
}
35-
35+
3636
public int insert(int val) {
3737
TreeNode p = tree.get((tree.size() - 1) / 2);
3838
TreeNode node = new TreeNode(val);
@@ -44,7 +44,7 @@ public int insert(int val) {
4444
}
4545
return p.val;
4646
}
47-
47+
4848
public TreeNode get_root() {
4949
return tree.get(0);
5050
}

solution/0900-0999/0919.Complete Binary Tree Inserter/Solution.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var CBTInserter = function (root) {
1515
return;
1616
}
1717
const q = [root];
18-
while (q.length > 0) {
18+
while (q.length) {
1919
const t = [];
2020
for (const node of q) {
2121
this.tree.push(node);

solution/0900-0999/0919.Complete Binary Tree Inserter/Solution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CBTInserter {
2020
return;
2121
}
2222
const q: TreeNode[] = [root];
23-
while (q.length > 0) {
23+
while (q.length) {
2424
const t: TreeNode[] = [];
2525
for (const node of q) {
2626
this.tree.push(node);

0 commit comments

Comments
 (0)