This question already has an answer here:
The question in question (no pun intended): Cutting stock recursion
OP basically dumped the problem definition and a solution on us. There is no indication to if the code actually works, it is homework and there is no indication to what the poster want's help with.
This is something I've struggled with for a while on CR, and I do not feel inclined to give a considerable amount of my time for someone who cannot be bothered to state what they want us to look at and help them with. To me it looks like "Here's my code, fix it please!".
On this particular occasion one user commented to "just give a general review". Is this the way to go? Can we not require at least some effort from the reviewee (is that a word?) to state what they want help with what they are looking for?