in reply to "Intelligent" array joining
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.
|
|---|