Skip to content

Commit 9b3f9e3

Browse files
committed
Runtime: 154 ms (Top 33.70%) | Memory: 56.1 MB (Top 16.54%)
1 parent 274bcc0 commit 9b3f9e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/M/Minimum Remove to Make Valid Parentheses/Minimum Remove to Make Valid Parentheses.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 154 ms (Top 33.70%) | Memory: 56.1 MB (Top 16.54%)
12
var minRemoveToMakeValid = function(s) {
23
let validity = 0;
34
for(let index = 0; index < s.length; index++) {
@@ -8,7 +9,7 @@ var minRemoveToMakeValid = function(s) {
89
}
910
else {
1011
validity--;
11-
}
12+
}
1213
}
1314
else if(s[index] == '(') {
1415
validity++;
@@ -24,4 +25,4 @@ var minRemoveToMakeValid = function(s) {
2425
}
2526
}
2627
return s;
27-
};
28+
};

0 commit comments

Comments
 (0)