Skip to content

Commit 177774e

Browse files
jamiebaseDaleSeo
andauthored
Update valid-parentheses/gcount85.py
Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com>
1 parent 416d65b commit 177774e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

valid-parentheses/gcount85.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ def isValid(self, s: str) -> bool:
2020
continue
2121
if not stack or brackets[stack.pop()] != b:
2222
return False
23-
if not stack:
24-
return True
25-
return False
23+
return not stack

0 commit comments

Comments
 (0)