Skip to content

Commit c5f9d8d

Browse files
authored
feat: update ts solution to lc problem: No.2696 (#1616)
1 parent 21d01c7 commit c5f9d8d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

solution/2600-2699/2696.Minimum String Length After Removing Substrings/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function minLength(s: string): number {
139139
for (const c of s) {
140140
if (c === 'B' && stk[stk.length - 1] === 'A') {
141141
stk.pop();
142-
} else if (c == 'D' && stk[stk.length - 1] === 'C') {
142+
} else if (c === 'D' && stk[stk.length - 1] === 'C') {
143143
stk.pop();
144144
} else {
145145
stk.push(c);

solution/2600-2699/2696.Minimum String Length After Removing Substrings/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function minLength(s: string): number {
121121
for (const c of s) {
122122
if (c === 'B' && stk[stk.length - 1] === 'A') {
123123
stk.pop();
124-
} else if (c == 'D' && stk[stk.length - 1] === 'C') {
124+
} else if (c === 'D' && stk[stk.length - 1] === 'C') {
125125
stk.pop();
126126
} else {
127127
stk.push(c);

solution/2600-2699/2696.Minimum String Length After Removing Substrings/Solution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function minLength(s: string): number {
33
for (const c of s) {
44
if (c === 'B' && stk[stk.length - 1] === 'A') {
55
stk.pop();
6-
} else if (c == 'D' && stk[stk.length - 1] === 'C') {
6+
} else if (c === 'D' && stk[stk.length - 1] === 'C') {
77
stk.pop();
88
} else {
99
stk.push(c);

0 commit comments

Comments
 (0)