6 kyu
Follow that Spy
50 of 2,086adromil
Description:
We are diligently pursuing our elusive operative, Matthew Knight, who also goes by the alias Roy Miller. He employs a nomadic lifestyle to evade detection, constantly moving from one location to another, with each of his journeys following a perplexing and non-standard sequence of itineraries. Our mission is to decipher the routes he will undertake during each of his voyages.
Task
You've been provided with an array of itinerary routes
, decipher the precise destinations he will visit in the correct sequence according to his meticulously planned itineraries.
Example
Based on the provided routes:
[ [USA, BRA], [JPN, PHL], [BRA, UAE], [UAE, JPN] ]
The correct sequence of destinations is:
"USA, BRA, UAE, JPN, PHL"
Note:
- You can safely assume that there will be no duplicate locations with distinct
routes
. - All
routes
provided will have non-empty itineraries. - There will always be at least one (1) route connecting one waypoint to another.
Algorithms
Similar Kata:
Stats:
Created | Feb 7, 2017 |
Published | Feb 13, 2017 |
Warriors Trained | 5655 |
Total Skips | 205 |
Total Code Submissions | 9021 |
Total Times Completed | 2086 |
Objective-C Completions | 50 |
PHP Completions | 112 |
Java Completions | 336 |
JavaScript Completions | 873 |
Swift Completions | 95 |
Rust Completions | 54 |
TypeScript Completions | 97 |
Python Completions | 470 |
C++ Completions | 76 |
Haskell Completions | 8 |
Total Stars | 151 |
% of votes with a positive feedback rating | 94% of 358 |
Total "Very Satisfied" Votes | 324 |
Total "Somewhat Satisfied" Votes | 27 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 10 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 7 kyu |