@rich Thank you! Usually when I have an idea, I check oeis.org for details. For ...
ruud de rooij @ruuddotorg@hachyderm.io
@rich Thank you!
Usually when I have an idea, I check oeis.org for details. For example, this particular case is described in https://oeis.org/A006253.
That gives me an idea of the complexity (and how many results I should expect) and usually an idea for the algorithm.
The actual algorithm varies based on the problem, though there are common approaches (e.g. things based on Catalan numbers usually use a recursive algorithm, versus this one which was just brute-force).
Hope this helps!