We are tracking down our rogue agent Matthew Knight A.K.A. Roy Miller and he travels from places to places to avoid being tracked. Each of his travels are based on a list of itineraries in an unusual or incorrect order. The task is to determine the routes he will take in his every journey. You are given an array of routes of his itineraries. List down only the places where he will go in correct order based on his itineraries.
Example:
routes = [[USA, BRA], [JPN, PHL], [BRA, UAE], [UAE, JPN]]
result: "USA, BRA, UAE, JPN, PHL"
note: It is safe to assume that there will be no repeating place with different rout
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #29 Multiples of 3 or 5 (6kyu) (0) | 2018.04.26 |
---|---|
codewars #28 Valid Braces (4kyu) (1) | 2018.04.25 |
오늘은 하루 쉼 (0) | 2018.04.23 |
codewars #26 lucky number (7kyu) (1) | 2018.04.20 |
codewars #25 Find The Parity Outlier (6kyu) (0) | 2018.04.19 |