Commit 2ce725ac authored by Alvin Cheung's avatar Alvin Cheung
Browse files

clarification for the search command

parent 6345f3ea
......@@ -166,11 +166,11 @@ The following are the functional specifications for the flight service system, t
The number of itineraries parameter controls how many itineraries should be returned. If the user requests `n` itineraries to be returned, there are a number of possibilities:
- `direct=1`: return up to `n` direct itineraries, or fewer if fewer than `n` direct itineraries exists.
- `direct=0`: return up to `n` direct itineraries. If there are `k` direct itineraries (where `k < n`), then return the `k` direct itineraries first, and then return up to `(n-k)` indirect itineraries with the shortest flight time, or fewer if fewer than `(n-k)` indirect itineraries exists.
- `direct=0`: return up to `n` direct itineraries. If there are `k` direct itineraries (where `k < n`), then return the `k` direct itineraries first, and then return up to `(n-k)` indirect itineraries with the shortest flight time, or fewer if fewer than `(n-k)` indirect itineraries exists. Direct flights and indirect flights should be sorted together, see below.
For the purpose of this assignment, an indirect itinerary means first going through another city before reaching the destination. The first and second flight must be on the same date (i.e., if Flight 1 arrives at Seattle at 11:59pm on Monday, and the connecting flight 2 departs from Seattle at 12:00am on Tuesday, then you can't put these two flights in the same itinerary as they are not on the same day).
In all cases the returned results should be sorted on `actual_time`. Return only flights that are not canceled, ignoring the capacity and number of seats available.
**In all cases the returned results should be sorted on `actual_time`.** Return only flights that are not canceled, ignoring the capacity and number of seats available.
Example of a direct flight from Seattle to Boston (actual itinerary numbers might differ, notice that only the day is printed out since we assume all flights happen in July 2015):
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment