File tree 3 files changed +11
-11
lines changed
solution/0100-0199/0107.Binary Tree Level Order Traversal II
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ public:
172
172
// pub left: Option<Rc<RefCell<TreeNode>>>,
173
173
// pub right: Option<Rc<RefCell<TreeNode>>>,
174
174
// }
175
- //
175
+ //
176
176
// impl TreeNode {
177
177
// #[inline]
178
178
// pub fn new(val: i32) -> Self {
@@ -273,11 +273,11 @@ func levelOrderBottom(root *TreeNode) [][]int {
273
273
* @return {number[][]}
274
274
*/
275
275
var levelOrderBottom = function (root ) {
276
- let ans = [];
276
+ const ans = [];
277
277
if (! root) return ans;
278
- let q = [root];
278
+ const q = [root];
279
279
while (q .length ) {
280
- let t = [];
280
+ const t = [];
281
281
for (let i = q .length ; i > 0 ; -- i) {
282
282
const node = q .shift ();
283
283
t .push (node .val );
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public:
160
160
// pub left: Option<Rc<RefCell<TreeNode>>>,
161
161
// pub right: Option<Rc<RefCell<TreeNode>>>,
162
162
// }
163
- //
163
+ //
164
164
// impl TreeNode {
165
165
// #[inline]
166
166
// pub fn new(val: i32) -> Self {
@@ -261,11 +261,11 @@ func levelOrderBottom(root *TreeNode) [][]int {
261
261
* @return {number[][]}
262
262
*/
263
263
var levelOrderBottom = function (root ) {
264
- let ans = [];
264
+ const ans = [];
265
265
if (! root) return ans;
266
- let q = [root];
266
+ const q = [root];
267
267
while (q .length ) {
268
- let t = [];
268
+ const t = [];
269
269
for (let i = q .length ; i > 0 ; -- i) {
270
270
const node = q .shift ();
271
271
t .push (node .val );
Original file line number Diff line number Diff line change 11
11
* @return {number[][] }
12
12
*/
13
13
var levelOrderBottom = function ( root ) {
14
- let ans = [ ] ;
14
+ const ans = [ ] ;
15
15
if ( ! root ) return ans ;
16
- let q = [ root ] ;
16
+ const q = [ root ] ;
17
17
while ( q . length ) {
18
- let t = [ ] ;
18
+ const t = [ ] ;
19
19
for ( let i = q . length ; i > 0 ; -- i ) {
20
20
const node = q . shift ( ) ;
21
21
t . push ( node . val ) ;
You can’t perform that action at this time.
0 commit comments