title: How do i convert this memoization code to dynamic programming (minimum coin change problem)
body: <pre><code>def coinchange(amountofchange):
      if mem[amountofchange]==-1:
          if amountofchange==0:
              mem[amountofchange] = 0
          else:
              m = amountofchange
              for i in range(len(coin)):
                  if coin[i]&lt;=amountofchange:
                      x = 1+coin(amountofchange-coin[i])
                      m = min(m,x)
              mem[amountofchange] = m
      return mem[amountofchange] 
  </code></pre>
  
  <p>I can memoize but cannot find a way to do it dynamically</p>