Object-Oriented Programming · Square · Medium
You receive a collection of flights, each written as a source:destination pair that represents a direct flight from one city to another. Using this data, work through the following three parts in order. Part 1. Construct a data structure from the flight list that lets you look up, for any city, the destinations reachable from it by a direct flight. Part 2. Given a starting city and a fixed number of intermediate cities, list every round trip that leaves the starting city,…