RosettaCodeData/Task/Permutations/Julia/permutations-2.julia

3 lines
149 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
# Generate all permutations of size t from an array a with possibly duplicated elements.
collect(Combinatorics.multiset_permutations([1,1,0,0,0],3))