Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: (Golf) Fibonacci Strings

by chipmunk (Parson)
on Jul 20, 2001 at 02:19 UTC ( [id://98263]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Fibonacci Strings

This isn't close to the shortest solution, but I think it's interesting so I'm posting it anyway. :)
sub is_fibo { my$m=pop;$_=$m=~s/^(.)(?!\1)//for$x,$y; $m=~s/\G(.)\1*/($z=length$&)==$x+$y||return;$x=$y;$y=$z/ge; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-16 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found