We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a26370a commit 28b1a0dCopy full SHA for 28b1a0d
decode_ways.py
@@ -1,4 +1,4 @@
1
-# -*- coding: utf-8 -*-
+# coding: utf-8
2
3
class Solution:
4
# @param {string} s a string, encoded message
@@ -21,4 +21,6 @@ def numDecodings(self, s):
21
if i < len(s) - 1:
22
if (s[i] == '1') or ((s[i] == '2') and (s[i + 1] <= '6')):
23
cached_nums[i] += cached_nums[i + 2]
24
- return cached_nums[0]
+ return cached_nums[0]
25
+
26
+# medium: http://lintcode.com/zh-cn/problem/decode-ways/
0 commit comments