We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43420c5 commit fa1160dCopy full SHA for fa1160d
scripts/algorithms/D/Decode Ways/Decode Ways.py
@@ -1,3 +1,4 @@
1
+# Runtime: 48 ms (Top 59.57%) | Memory: 14.1 MB (Top 30.54%)
2
class Solution:
3
def numDecodings(self, s: str) -> int:
4
if s[0] == '0' or '00' in s:
@@ -39,4 +40,4 @@ def numDecodings(self, s: str) -> int:
39
40
else:
41
num = dp[i-1]
42
dp.append(num)
- return dp[l-1]
43
+ return dp[l-1]
0 commit comments