Array permutations

Vino akashvino79 at gmail.com
Sat Sep 11 19:37:42 UTC 2021


Hi All,

    Request your help on the below to print the below array as 
"Required output", Was able to get these values 
"[1,2],[2,3],[3,4],[4,5]" by using list.slide(2), need your help 
to get values "1,3],[1,4],[1,5],[2,4],[2,5],[3,5]"

auto list[] = [1,2,3,4,5]

Required output
[1,2],[2,3],[3,4],[4,5],[1,3],[1,4],[1,5],[2,4],[2,5],[3,5]

From,
Vino


More information about the Digitalmars-d-learn mailing list