File tree 3 files changed +3
-3
lines changed
solution/1000-1099/1017.Convert to Base -2
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ function baseNeg2(n: number): string {
170
170
return ' 0' ;
171
171
}
172
172
let k = 1 ;
173
- let ans: string [] = [];
173
+ const ans: string [] = [];
174
174
while (n ) {
175
175
if (n % 2 ) {
176
176
ans .push (' 1' );
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ function baseNeg2(n: number): string {
148
148
return ' 0' ;
149
149
}
150
150
let k = 1 ;
151
- let ans: string [] = [];
151
+ const ans: string [] = [];
152
152
while (n ) {
153
153
if (n % 2 ) {
154
154
ans .push (' 1' );
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ function baseNeg2(n: number): string {
3
3
return '0' ;
4
4
}
5
5
let k = 1 ;
6
- let ans : string [ ] = [ ] ;
6
+ const ans : string [ ] = [ ] ;
7
7
while ( n ) {
8
8
if ( n % 2 ) {
9
9
ans . push ( '1' ) ;
You can’t perform that action at this time.
0 commit comments