Skip to content

Commit 7128097

Browse files
authored
feat: update js solution to lc problem: No.0107 (doocs#1285)
1 parent e968d90 commit 7128097

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

solution/0100-0199/0107.Binary Tree Level Order Traversal II/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public:
172172
// pub left: Option<Rc<RefCell<TreeNode>>>,
173173
// pub right: Option<Rc<RefCell<TreeNode>>>,
174174
// }
175-
//
175+
//
176176
// impl TreeNode {
177177
// #[inline]
178178
// pub fn new(val: i32) -> Self {
@@ -273,11 +273,11 @@ func levelOrderBottom(root *TreeNode) [][]int {
273273
* @return {number[][]}
274274
*/
275275
var levelOrderBottom = function (root) {
276-
let ans = [];
276+
const ans = [];
277277
if (!root) return ans;
278-
let q = [root];
278+
const q = [root];
279279
while (q.length) {
280-
let t = [];
280+
const t = [];
281281
for (let i = q.length; i > 0; --i) {
282282
const node = q.shift();
283283
t.push(node.val);

solution/0100-0199/0107.Binary Tree Level Order Traversal II/README_EN.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public:
160160
// pub left: Option<Rc<RefCell<TreeNode>>>,
161161
// pub right: Option<Rc<RefCell<TreeNode>>>,
162162
// }
163-
//
163+
//
164164
// impl TreeNode {
165165
// #[inline]
166166
// pub fn new(val: i32) -> Self {
@@ -261,11 +261,11 @@ func levelOrderBottom(root *TreeNode) [][]int {
261261
* @return {number[][]}
262262
*/
263263
var levelOrderBottom = function (root) {
264-
let ans = [];
264+
const ans = [];
265265
if (!root) return ans;
266-
let q = [root];
266+
const q = [root];
267267
while (q.length) {
268-
let t = [];
268+
const t = [];
269269
for (let i = q.length; i > 0; --i) {
270270
const node = q.shift();
271271
t.push(node.val);

solution/0100-0199/0107.Binary Tree Level Order Traversal II/Solution.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
* @return {number[][]}
1212
*/
1313
var levelOrderBottom = function (root) {
14-
let ans = [];
14+
const ans = [];
1515
if (!root) return ans;
16-
let q = [root];
16+
const q = [root];
1717
while (q.length) {
18-
let t = [];
18+
const t = [];
1919
for (let i = q.length; i > 0; --i) {
2020
const node = q.shift();
2121
t.push(node.val);

0 commit comments

Comments
 (0)