Permutations/Rank of a permutation: Difference between revisions

m
m ({{out}})
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 shouldought beto readilytake acheivableabout 100 minutes on that particular test machine.
 
<lang j> A. 2 0 1 NB. return rank of permutation
6,951

edits