A common variation of generating permutations is to generate only unique permutations Of course, we could use the version above together with a Set as collector instead of a Vec. But let's try something different: how can we avoid to generate duplicated permutations in the first place, can we tweak the algorithm above?
(arr: &[T])
source not stored for this graph (policy: none)