Skip to content

Commit 1c2274b

Browse files
authored
Update Solution3.js
1 parent 42849c9 commit 1c2274b

File tree

1 file changed

+6
-3
lines changed
  • solution/0900-0999/0921.Minimum Add to Make Parentheses Valid

1 file changed

+6
-3
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
function minAddToMakeValid(s: string): number {
1+
/**
2+
* @param {string} s
3+
* @return {number}
4+
*/
5+
var minAddToMakeValid = function (s) {
26
const l = s.length;
37
s = s.replace('()', '');
4-
58
return s.length === l ? l : minAddToMakeValid(s);
6-
}
9+
};

0 commit comments

Comments
 (0)