We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad136a9 commit 3a8c14aCopy full SHA for 3a8c14a
678-Valid-Parenthesis-String.py
@@ -1,4 +1,4 @@
1
-# Dynamic Programming: O(n^3)
+# Dynamic Programming: O(n^2)
2
class Solution:
3
def checkValidString(self, s: str) -> bool:
4
dp = { (len(s), 0) : True } # key=(i, leftCount) -> isValid
0 commit comments