in reply to Re: Please help me understand this permutation sub?
in thread Please help me understand this permutation sub?
Thanks LanX,
Your added print statements are very similar to what I had been using myself, but far more visually helpful.
My problem stems from this point in the output:
1: 2:a 3:ab 4:abc 5:abcd abcd 4:abd 5:abdc
I understand the 1:-5: lines, and the bare abcd. I get how they were generated and where they came from. But I am not following the logic of how it then goes from $perm = abcd and @set=[] to $perm = abd and @set=[c], or how $level went from 5 back to 4.
Any way you would be able to clarify that?
Thanks!
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Please help me understand this permutation sub?
by LanX (Saint) on Dec 09, 2020 at 12:26 UTC | |
by mdunnbass (Monk) on Dec 09, 2020 at 14:06 UTC | |
|
Re^3: Please help me understand this permutation sub?
by LanX (Saint) on Dec 09, 2020 at 08:39 UTC | |
by mdunnbass (Monk) on Dec 09, 2020 at 14:04 UTC |