Algorithm to create a linked list from a set of nodes
- by user320587
Hi,
I am looking for an algorithm to create a linked list from a set of nodes. For example, let's assume a node is an airline ticket from a source point to destination. (e.g., Chicago to Detroit) and there are several airline tickets. Assuming all these airline tickets are jumbled, what is the best way to determine the entire journey path.
If there are 5 airline tickets like Chicago-Detroit, Denver-Chicago, Detroit-DC, DC-New York, San Jose-Denver, the algorithm should be able to come up with the correct start to end path.
San Jose - Denver - Chicago - Detroit - DC - New York