Anonymous user
Permutations: Difference between revisions
m
→Iterative implementation
(→{{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):
|