How can I count the number of permutations?

Revision en1, by codemode, 2019-01-24 20:03:05

We are given array-'a' and array-'b' consisting of positive integers. How can I count all the permutation of array 'a' which are strictly lexicographically smaller than array-'b' ?

I know the brute-force solution. Is there any better solution available?

Thanks :)

Tags permutations

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English codemode 2019-01-24 20:29:30 257
en1 English codemode 2019-01-24 20:03:05 315 Initial revision (published)