Permutations: Difference between revisions

m
→‎alternative: remark of lexicographic order
No edit summary
m (→‎alternative: remark of lexicographic order)
Line 3,056:
The above version takes more than 5 secs.My permlex takes 2.8s, but in the depth of my harddisk I found a version, creating all permutations using k places out of n.The cpu loves it! 1.33 s.
But you have to use the integers [1..n] directly or as Index to your data.
1 to n are in lexicographic order.
<lang pascal>{$IFDEF FPC}
{$MODE DELPHI}
Anonymous user