Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: One Zero variants_without_repetition

by GrandFather (Saint)
on Aug 07, 2007 at 21:03 UTC ( [id://631155]=note: print w/replies, xml ) Need Help??


in reply to Re^4: One Zero variants_without_repetition
in thread One Zero variants_without_repetition

Perhaps if you told us what you were trying to achieve we might understand what it is that you actually need. Up to now every time someone suggests a new solution you have introduced a new requirement.

Tell us what you need this for and what the constraints are on the input parameters and what the requirements are for the output.

A fairly trivial change to the recursive code I gave will change it to work with a string of characters rather than a "string" of bits. You would still run into deep recursion issues with large numbers of ones and other solutions are likely to be faster (memory constraints on recursion are unlikely to be a factor though) however.


DWIM is Perl's answer to Gödel
  • Comment on Re^5: One Zero variants_without_repetition

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://631155]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-19 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found