title: Lattice paths algorithm does not finish running for 20 X 20 grid
body: <p>I wrote the following code in python to solve 
  <a href="http://projecteuler.net/index.php?section=problems&amp;id=15" rel="nofollow">problem 15 from Project Euler</a>:</p>
  
  <pre><code>grid_size = 2
  def get_paths(node):
          global paths
  
          if  node[0]  &gt;= grid_size and node[1] &gt;= grid_size:
                  paths += 1
                  return
          else:
                  if node[0]&lt;grid_size+1 and node[1] &lt; grid_size+1:
                       get_paths((node[0]+1,node[1]))
                       get_paths((node[0],node[1]+1))
          return paths
  
  def euler():
                  print get_paths((0,0))
  
  paths = 0
  if __name__ == '__main__':
      euler()
  </code></pre>
  
  <p>Although it runs quite well for a 2 X 2 grid, it's been running for hours for a 20 X 20 grid.  How can I optimise the code so that it can run on larger grids?
  Is it a kind of breadth first search problem? (It seems so to me.)</p>
  
  <p>How can I measure the complexity of my solution in its current form? </p>