Question: C# We are tracking down our rogue agent and she travels from place to place to avoid being tracked. Each of her travels are based
C#
We are tracking down our rogue agent and she travels from place to place to avoid being tracked. Each of her travels are based on a list of itineraries in an unusual or incorrect order. The task is to determine the complete route she will take.
You are given an array of routes containing her travel itineraries. Convert this into a complete, in-order list of the places she will travel.
Specification
Challenge.FindRoutes(routes)
Parameters
routes: Array - Array of itineraries
Return Value
string - An ordered list or destinations
Constraints
All inputs have at least one valid, complete route
Examples
routes
[["USA","BRA"],
["JPN","PHL"],
["BRA","UAE"],
["UAE","JPN"]]
Return Value
"USA, BRA, UAE, JPN, PHL"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
