Oct-02-2020, 10:34 PM
10 sticks with 20 items is still only a few thousand combinations and takes nearly no time to compute. 20 sticks with 100 items is a different proposition. However, most of the partial solutions repeat over and over again and you could probably leverage that to reduce the calculations needed to find a solution.
If you use a recursive solution remember that Python maxes out at 1000 levels of recursion (I think).
If you use a recursive solution remember that Python maxes out at 1000 levels of recursion (I think).