please help me to reverse a function call order
test123
test123 at gmail.com
Mon Jul 25 04:23:16 UTC 2022
On Sunday, 24 July 2022 at 15:49:51 UTC, Salih Dincer wrote:
> On Sunday, 24 July 2022 at 15:11:45 UTC, Salih Dincer wrote:
>> ...But you know this classic recurisive function:
>
> The `permut()` function works with many types, for example
> `char`. Look at probability 40: 😀
> ```d
> void main() {
> int totalCount;
> ['a', 'd', 'g', 'l', 'n'].permut(totalCount);
> totalCount.writeln(" permutation found...");
> } /* Output:
>
> ...
> dagln: 25
> dagnl: 26
> dalgn: 27
> dalng: 28
> danlg: 29
> dangl: 30
> dgaln: 31
> dganl: 32
> dglan: 33
> dglna: 34
> dgnla: 35
> dgnal: 36
> dlgan: 37
> dlgna: 38
> dlagn: 39
> dlang: 40
> dlnag: 41
> dlnga: 42
> dngla: 43
> dngal: 44
> dnlga: 45
> dnlag: 46
> dnalg: 47
> dnagl: 48
> ...
> 120 permutation found...
>
> Process finished.
> ```
>
> SDB@
not match by:
1) the element is not repeat
2) the element is position related
More information about the Digitalmars-d-learn
mailing list