Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Pure regex Hamiltonian Circuit solution

by blokhead (Monsignor)
on Oct 10, 2003 at 17:44 UTC ( #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? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-11-30 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?