Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: (Golf) Shortest Graph Distance

by MeowChow (Vicar)
on May 12, 2001 at 01:42 UTC ( #79847=note: print w/replies, xml ) Need Help??


in reply to (Golf) Shortest Graph Distance

Best I could do so far, strict and warning clean, at 158 chars:
sub path { my($g,$s,$e,@p,$q)=@_;@_=[0,$s];{my($l,@r)=@{+shift};if(!@p||$q>$l){ +@p=@r,$q=$l if$r[-1]eq$e;my$o=$$g{$r[-1]};push@_,map[$l+$$o{$_},@r,$_ +],keys%$o}@_&&redo}@p }
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79847]
help
Chatterbox?
[1nickt]: Yes, and recommendation against using it, in the doc for Devel::Declare, on whcih it is based.
[1nickt]: I asked the new $boiss what I should brush up on before starting work next week, and he named Moo, DBIx::Class and Method::Signatures
[1nickt]: choroba That's why I asked if anyone is using it :-)
choroba only has used Moo from the htree
[1nickt]: Pardonm?
[choroba]: three

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-11-24 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (349 votes). Check out past polls.

    Notices?