Permutations/Rank of a permutation: Difference between revisions
Permutations/Rank of a permutation (view source)
Revision as of 04:11, 16 February 2015
, 9 years ago→{{header|J}}
m ({{out}}) |
m (→{{header|J}}) |
||
Line 392:
=={{header|J}}==
The J primitive <code>A.</code> provides an effective solution to this task. Generating 4 random permutations of 144 items takes about 6 milliseconds so solving the Stack Overflow question
<lang j> A. 2 0 1 NB. return rank of permutation
|