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

animasi  bergerak gif
animasi  bergerak gif
animasi  bergerak gif
animasi  bergerak gif
Flame Flame FlameFlameFlame X-Steel Pointer