public int numDecodings(String s) {
		if (s == null || s.length() == 0) {
			return 0;
		}
		char[] cs = s.toCharArray();
		int n = cs.length;

		int[] c = new int[n + 1];
		c[0] = 1;
		for (int i = 1; i <= n; i++) {
			int c1 = 0;
			if (cs[i - 1] != '0')
				c1 = c[i - 1];
			int c2 = 0;
			if (i >= 2
					&& (cs[i - 2] == '1' || cs[i - 2] == '2'
							&& cs[i - 1] <= '6'))
				c2 = c[i - 2];
			c[i] = c1 + c2;
		}

		return c[n];
	}