Skip to content

Commit b12a42e

Browse files
authored
Update longest_valid_parenthesis.py
added longest_valid_parenthesis.py
1 parent ec09f3f commit b12a42e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

strings/longest_valid_parenthesis.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ def longest_valid_parenthesis(self, s: str) -> int:
2727
while stack:
2828
res = max(res, stack.pop())
2929
return res * 2
30-
31-
3230
if __name__ == "__main__":
33-
from doctest import testmod
34-
35-
testmod()
31+
s = input()
32+
print(longest_valid_parenthesis(s))

0 commit comments

Comments
 (0)