this, here is the python version:
My next task is to remove the recursion. I have a fairly good idea of how to do it, but it will take me a few iterations to get it right.
In regards to
def initialList(size): return [0 for x in range(size)] def XinY_Go(x,y,index,slots): if (y - index) == 1: slots[index] = x print slots slots[index] = 0 return for i in range(x+1): slots[index] = x-i XinY_Go(x-(x-i), y, index + 1, slots) def XinY(x,y): return XinY_Go(x,y,0,initialList(y))
My next task is to remove the recursion. I have a fairly good idea of how to do it, but it will take me a few iterations to get it right.