http://qs1969.pair.com?node_id=11121906


in reply to Re^2: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's -- permutations
in thread Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's

This is neat code but is doing far too much work because it permutes every zero with every other zero (and also every one with every other one). eg. if you run it with 2 zeros and 2 ones you will get 4 duplicates for each answer. Increasing the numbers just makes the problem exponentially worse. Try with 9 zeros and 1 one and you'll soon see what I mean :-)


🦛