We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d1d616 commit 8e7f55bCopy full SHA for 8e7f55b
dynamic_programming/decode_ways.py
@@ -1,4 +1,4 @@
1
-'''
+"""
2
A message containing letters from A-Z is being encoded to numbers using the
3
following mapping:
4
'A' -> 1
@@ -7,7 +7,7 @@
7
'Z' -> 26
8
Given a non-empty string containing only digits,
9
determine the total number of ways to decode it.
10
11
12
def num_decodings(s: str):
13
"""
@@ -38,7 +38,6 @@ def num_decodings(s: str):
38
curr = last
39
40
last, second_last = curr, last
41
-
42
return last
43
44
0 commit comments