Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Pure regex Hamiltonian Circuit solution

by blokhead (Monsignor)
on Oct 10, 2003 at 17:44 UTC ( [id://298341]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @E = ([1,3],[1,5],[2,3],[2,4],[2,5],[4,5]);
    my $V = 5;
    ...
    } else {
      print "No Hamiltonian circuit\n";
    }
    
  2. or download this
    $string = q[
    1 2 3 4 5
    ...
    
    __OUTPUT__
    Hamiltonian circuit: [ 5 -> 4 -> 2 -> 3 -> 1 -> 5 ]
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://298341]
Approved by Aristotle
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found