Skip to content

Commit a6b84d8

Browse files
committed
feat: update solutions to lc problems: No.0006
1 parent 324fbd8 commit a6b84d8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

solution/0000-0099/0006.Zigzag Conversion/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func convert(s string, numRows int) string {
211211
*/
212212
var convert = function (s, numRows) {
213213
if (numRows == 1) return s;
214-
let arr = new Array(numRows);
214+
const arr = new Array(numRows);
215215
for (let i = 0; i < numRows; i++) arr[i] = [];
216216
let mi = 0,
217217
isDown = true;
@@ -225,7 +225,7 @@ var convert = function (s, numRows) {
225225
else mi--;
226226
}
227227
let ans = [];
228-
for (let item of arr) {
228+
for (const item of arr) {
229229
ans = ans.concat(item);
230230
}
231231
return ans.join('');

solution/0000-0099/0006.Zigzag Conversion/README_EN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func convert(s string, numRows int) string {
205205
*/
206206
var convert = function (s, numRows) {
207207
if (numRows == 1) return s;
208-
let arr = new Array(numRows);
208+
const arr = new Array(numRows);
209209
for (let i = 0; i < numRows; i++) arr[i] = [];
210210
let mi = 0,
211211
isDown = true;
@@ -219,7 +219,7 @@ var convert = function (s, numRows) {
219219
else mi--;
220220
}
221221
let ans = [];
222-
for (let item of arr) {
222+
for (const item of arr) {
223223
ans = ans.concat(item);
224224
}
225225
return ans.join('');

solution/0000-0099/0006.Zigzag Conversion/Solution.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
var convert = function (s, numRows) {
77
if (numRows == 1) return s;
8-
let arr = new Array(numRows);
8+
const arr = new Array(numRows);
99
for (let i = 0; i < numRows; i++) arr[i] = [];
1010
let mi = 0,
1111
isDown = true;
@@ -19,7 +19,7 @@ var convert = function (s, numRows) {
1919
else mi--;
2020
}
2121
let ans = [];
22-
for (let item of arr) {
22+
for (const item of arr) {
2323
ans = ans.concat(item);
2424
}
2525
return ans.join('');

0 commit comments

Comments
 (0)