Permutations: Difference between revisions
Content added Content deleted
(→{{header|Python}}: + nextperm) |
|||
Line 3,006:
(2, 1, 0)</lang>
=== Iterative implementation ===
Given a permutation, one can easily compute the ''next'' permutation in some
<lang python>def nextperm(a):
|