Nice!
I tried something like this but couldn't quite get my head around it. I found the iterative approach a lot easier to grok in the end. I added your code to my benchmark., but I couldn't get the non push/pop version going. If you tell me what change I need to do (it should return an AoA instead of printing the list of elements) then I'll add that variant in as well.
++ to you for sure. :-)
• Update:
Once I looked at the code again I realized my error and added both versions to the benchmark. The push/pop variant is faster. Nice stuff.
In reply to Re: Re: Printing combinations, code review request
by demerphq
in thread Printing combinations, code review request
by SparkeyG
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |