Skip to content

Commit b313a7d

Browse files
committed
921 finish
1 parent 7a189f2 commit b313a7d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package problem0921
22

3-
func minAddToMakeValid(S string) int {
3+
import "strings"
44

5-
return 0
5+
func minAddToMakeValid(S string) int {
6+
for strings.Contains(S, "()") {
7+
S = strings.Replace(S, "()", "", -1)
8+
}
9+
return len(S)
610
}

0 commit comments

Comments
 (0)