One-way flight trip problem.

Posted by psihodelia on Stack Overflow See other posts from Stack Overflow or by psihodelia
Published on 2010-06-07T18:06:36Z Indexed on 2010/06/07 18:12 UTC
Read the original article Hit count: 208

Filed under:
|
|

You are going on a one-way indirect flight trip that includes billions transfers. You are not stopping twice in the same airport. You have 1 ticket for each part of your trip. Each ticket contains src and dst airport. All the tickets you have are randomly sorted. You forgot the original departure airport (very first src) and your destination (last dst).

Design an algorithm to reconstruct your trip with minimum big-O complexity.

© Stack Overflow or respective owner

Related posts about c

    Related posts about algorithm