Let's say I have a given array of numbers looking something like this {1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4}
and I want to get every combination E.g. {1, 2, 3, 4, 4, 2, 1, 1, 2, 1, 3, 3, 4, 3}
but I don't want to have duplicate combinations for example if you would get a result where the first and seventh were exchanged.
I've tried getting every combination even duplicates but as you can guess this escalates pretty quickly.
Thanks for your answers in advance!
Aucun commentaire:
Enregistrer un commentaire