Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: "Intelligent" array joining

by thospel (Hermit)
on Feb 07, 2004 at 13:09 UTC ( [id://327310]=note: print w/replies, xml ) Need Help??


in reply to "Intelligent" array joining

Several good answers all based on basically doing a topological sort have already been given.

Can this problem also be solved without essentially doing a topological sort ?

When you consider as input a sequence of arrays where each consists of two elements, that simply says the first element must come before the second, and you actually have the standard way to ask for a topological sort.

So no, in general you can't. Any solution must also be able to do a topological sort.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-18 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found