I have an array of integers of length 20, filled with fourteen 0s, two 1s, two 2s and two 3s. It is like this: [0,0,0,3,0,2,0,0,3,0,0,0,1,0,2,0,0,1,0,0].
I need a way to list all of its 20!/(14! 2! 2! 2!) permutations, without repetitions. (Note that in the list there are duplicate elements!)
I'm just looking for the right idea, it isn't necessary that you write the code. But, if you prefer writing the code, I only understand C and Java. Thanks :)