Permutations: Difference between revisions
Content added Content deleted
Line 2,959: | Line 2,959: | ||
1324 2134 1234 |
1324 2134 1234 |
||
</pre> |
</pre> |
||
=={{header|EasyLang}}== |
|||
<syntaxhighlight lang="easylang"> |
|||
proc permlist k . list[] . |
|||
for i = k to len list[] |
|||
swap list[i] list[k] |
|||
call permlist k + 1 list[] |
|||
swap list[k] list[i] |
|||
. |
|||
if k = len list[] |
|||
print list[] |
|||
. |
|||
. |
|||
l[] = [ 1 2 3 ] |
|||
call permlist 1 l[] |
|||
</syntaxhighlight> |
|||
=={{header|Ecstasy}}== |
=={{header|Ecstasy}}== |