File tree 3 files changed +3
-3
lines changed
solution/2600-2699/2696.Minimum String Length After Removing Substrings
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ function minLength(s: string): number {
139
139
for (const c of s ) {
140
140
if (c === ' B' && stk [stk .length - 1 ] === ' A' ) {
141
141
stk .pop ();
142
- } else if (c == ' D' && stk [stk .length - 1 ] === ' C' ) {
142
+ } else if (c === ' D' && stk [stk .length - 1 ] === ' C' ) {
143
143
stk .pop ();
144
144
} else {
145
145
stk .push (c );
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ function minLength(s: string): number {
121
121
for (const c of s ) {
122
122
if (c === ' B' && stk [stk .length - 1 ] === ' A' ) {
123
123
stk .pop ();
124
- } else if (c == ' D' && stk [stk .length - 1 ] === ' C' ) {
124
+ } else if (c === ' D' && stk [stk .length - 1 ] === ' C' ) {
125
125
stk .pop ();
126
126
} else {
127
127
stk .push (c );
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ function minLength(s: string): number {
3
3
for ( const c of s ) {
4
4
if ( c === 'B' && stk [ stk . length - 1 ] === 'A' ) {
5
5
stk . pop ( ) ;
6
- } else if ( c == 'D' && stk [ stk . length - 1 ] === 'C' ) {
6
+ } else if ( c === 'D' && stk [ stk . length - 1 ] === 'C' ) {
7
7
stk . pop ( ) ;
8
8
} else {
9
9
stk . push ( c ) ;
You can’t perform that action at this time.
0 commit comments