Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. In reply to Re: "Intelligent" array joining
by thospel
|
|