How to achieve below permutation ?
Permutation set = [0,1,2]
Permutation sub set cardinality = 2; ( example : [0,0] , [1,2] ....)
Repetition = true;
Result : [0,0] [0,1] [0,2] [1,0] [1,1] [1,2] [2,0] [2,1] [2,2]
How to generalize for the Permutation set = [0,1,2,3...n-1]