I'm not sure how I should take merits for Eily's work °... But thanks. :)
My goal was simplicity, if it was about speed I might provide an other approach plus case optimization. (Like inverting to the dual case if more than half of the bits are ones)
The output format should be clarified though. String, bit vector, array...?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) oh I see Re^2: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's
In reply to Re^2: Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's [Updated]
by LanX
in thread Generate all unique combinations of 1 and 0 using specified length of "0"-string and count of 1's
by Lana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |