Generating all combinations of length X in an array

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 8 03:54:44 PDT 2015


wobbles:

> While trying to generate all combinations of length X in an 
> array,
> I came across the question on stackoverflow. [1]
>
> Theres a couple good answers there, but one that caught my eye 
> shows a C# code snippet that is quite nice and short:

Often short code is not the best code.

Take a look at the versions here, the usable one is the third:
http://rosettacode.org/wiki/Combinations#D

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list