Flight Tickets
CodeChefOpen on judge ↗
One day, Megan bought a one-way ticket from somewhere to somewhere with some flight transfers. For example: SFO->DFW DFW->JFK JFK->MIA MIA->ORD. Obviously, transfer flights to a city twice, or more doesn't make sense. So Megan will not do that. Unfortunately, after she received the tickets, she messed up with the tickets and forgot the order of the tickets. Help Megan rearrange the tickets to ar
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start