<jupyter_start><jupyter_text>Title : Decode WaysChapter : Dynamic ProgrammingLink : [YouTube](https://youtu.be/SGicalYx4wE)ChapterLink : [PlayList](https://www.youtube.com/playlist?list=PLDV-cCQnUlIa0owhTLK-VT994Qh6XTy4v)문제 : 숫자열을 디코딩 하는 방법의 갯수를 계산하여라<jupyter_code>def decodingBtmUp(s: str) -> int:
  str_length = len(s)
  if str_length == 0 :
    return 0    
  
  dp = [None]*(str_length+1)
  dp[-1] = 1
  
  last_char = s[-1]
  if int(last_char) == 0:
    dp[str_length-1] = 0
  else:
    dp[str_length-1] = 1

  for idx in range(str_length-2,-1,-1):
    single_num = int(s[idx])
    single_count = 0
    if 0<single_num:
      single_count = dp[idx+1]      
    
    double_num = int(s[idx:idx+2])
    double_count = 0
    if 10<=double_num<=26:
      double_count = dp[idx+2]
    
    count = single_count + double_count
    dp[idx] = count
          
    
  return dp[0]
decodingBtmUp("212325")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13655913978494624, 'fraction_numerical': 0.04086021505376344, 'mean_word_length': 3.137777777777778, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '546772', 'license': 'MIT', 'n_tokens_mistral': 431, 'n_tokens_neox': 423, 'n_words': 65, 'path': 'dynamicProgramming/decodeNums.ipynb', 'repo_name': 'NoCodeProgram/CodingTest', 'size': '930'}