Advanced Data Structures · course project
One network. More ways to find a route.
I built a C++ command-line engine that turns airport and flight files into a searchable graph. It finds routes by fare, distance, connections, time, and required stops.
View source on GitHub ↗- Built
- 16 search operations in approximately one month
- Stack
- C++ · BFS · Dijkstra · time-aware search
- Scale
- 100+ airports; 100,000+ original course flight records
What would you like to find?
Explore the original 16-operation menu. Each request shows its inputs, output, and underlying search strategy.
Airport and direct-flight lookup
Path and optimization
Reachability limits
Required stop and time
All 16 operations from the original command-line menu are represented here.
One graph, multiple definitions of “best.”
Every flight is directional. A route from airport A to airport B does not automatically create a route back from B to A. The request determines how the graph is traversed and what each connection means.
Queue-based traversal
Used to discover a valid multi-stop path and to explore which destinations remain reachable under flight-count or fare limits.
PATHS / REACHABILITYVariable edge weights
The same shortest-path routine can treat each connection as fare, miles, or a unit weight of one flight, depending on the selected menu operation.
FARE / MILES / CONNECTIONSConstrained route search
Separate routines account for departure times, arrival times, elapsed hours, and a required middle airport. Required-stop requests run in two stages: source to M, then M to destination.
TIME / REQUIRED STOPThe algorithms operated behind the interface; users selected the travel question they wanted answered rather than selecting an algorithm by name.
The data structure made every route addressable.
Airport codes were mapped to indexes for fast lookup. The route matrix then used an origin index, destination index, and flight-option index to preserve every available directed flight between two airports.
airportIndex["BIS"] → 12airportIndex["DEN"] → 46An unordered map converts a human-readable airport code into the index used by the graph.
The first two dimensions identify the route. The third stores each separate flight option available on that route.
- Origin and destination
- Departure, arrival, and duration
- Fare and miles
- Flight ID and airline
Grouped related airport and flight fields into records the algorithms could pass through consistently.
Each stored flight represented movement from one specific origin to one specific destination.
The third dimension retained more than one possible flight between the same pair of airports.
The unordered map avoided repeatedly scanning the airport dataset to locate a code.
The difficult part was making the entire system agree.
This was my first time working with a dataset this large and my first time combining graph traversal, weighted optimization, schedule constraints, and 16 different requests in one application. The challenge was not limited to one isolated bug.
Read two large datasets while keeping airport and flight records consistent.
Resolve airport codes quickly enough to support repeated interactive requests.
Represent directed routes and multiple flight options without losing their details.
Choose the correct traversal or weighted strategy for each user request.
Combine stops, times, fares, hours, distances, and destination requirements.
“The whole thing was hard to do.” That difficulty is what made it the first project that showed me I could work through real data complexity rather than only small classroom examples.
The complete project is now available on GitHub.
The public repository contains the original C++ implementation, supporting data files, and instructions for compiling and running the 16-operation command-line application locally.
Review the graph structure, route-search algorithms, airport lookup system, and constrained flight operations used throughout the project.
g++ -std=c++11 11weird.cpp -o flighttracker
./flighttracker place.a1 quizn.air2
- Complete C++ source code
- Airport and flight data files
- Sixteen command-line operations
- BFS, Dijkstra, and constrained graph searches
- Local compilation and usage instructions
The route map above is an interactive explanation, not a claim that the original program used a graphical interface. The 100,000+ scale refers to the original course dataset; smaller public sample files can be included for reproducible demonstrations.