title: count number of basketball plays when given the final score
body: <p>Given the final score of a basketball game, how i can count the number of possible scoring sequences that lead to the final score.</p>
  
  <p>Each score can be one of: 3 point, 2 point, 1 point score by either the visiting or home team. For example:</p>
  
  <pre><code>basketball(3,0)=4
  </code></pre>
  
  <p>Because these are the 4 possible scoring sequences:</p>
  
  <pre><code>V3
  V2, V1
  V1, V2
  V1, V1, V1
  </code></pre>
  
  <p>And:
      basketball(88,90)=2207953060635688897371828702457752716253346841271355073695508308144982465636968075</p>
  
  <p>Also I need to do it in a recursive way and without any global variables(dictionary is allowed and probably is the way to solve this)
  Also, the function can get only the result as an argument (basketball(m,n)).</p>
  
  <p>for those who asked for the solution:</p>
  
  <pre><code>basketballDic={}
  def basketball(n,m):
      count=0;
      if n==0 and m==0:
          return 1;
      if (n,m) in basketballDic:
          return basketballDic[(n,m)]
      if n&gt;=3:
          count+= basketball(n-3,m)
      if n&gt;=2:
          count+= basketball(n-2,m)
      if n&gt;=1:
          count+= basketball(n-1,m)
      if m&gt;=3:
          count+= basketball(n,m-3)
      if m&gt;=2:
          count+= basketball(n,m-2)
      if m&gt;=1:
          count+= basketball(n,m-1)
      basketballDic[(n,m)]=count;
      return count;
  </code></pre>