Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b3509a4

Browse files
feat: update solutions to lc problems: No.1017
1 parent ced9f63 commit b3509a4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎solution/1000-1099/1017.Convert to Base -2/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function baseNeg2(n: number): string {
170170
return '0';
171171
}
172172
let k = 1;
173-
let ans: string[] = [];
173+
const ans: string[] = [];
174174
while (n) {
175175
if (n % 2) {
176176
ans.push('1');

‎solution/1000-1099/1017.Convert to Base -2/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function baseNeg2(n: number): string {
148148
return '0';
149149
}
150150
let k = 1;
151-
let ans: string[] = [];
151+
const ans: string[] = [];
152152
while (n) {
153153
if (n % 2) {
154154
ans.push('1');

‎solution/1000-1099/1017.Convert to Base -2/Solution.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function baseNeg2(n: number): string {
33
return '0';
44
}
55
let k = 1;
6-
let ans: string[] = [];
6+
const ans: string[] = [];
77
while (n) {
88
if (n % 2) {
99
ans.push('1');

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /