Materials of IT
By Adi Jaya, S.Kom
Permutations as integers by The Lehmer Code
A permutation of an array is an array that contains the same elements, but possibly in a different order.
For example, given the array :
[ a , b , c ]
All of its permutations are :
[ a , b , c ]
[ a , c , b ]
[ b , a , c ]
[ b , c , a ]
[ c , a , b ]
[ c , b , a ]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment