The program has aim to maximize customer satisfaction.
-
Clone this repository
-
Enter the directory
-
Run the app
$ python airline.py data.txt
data.txt – input file with passengers and count of siats
Emxample:
4 4
1W 2 3
4 5 6 7
8
9 10 11W
12W
13 14
15 16
The first line specifies the dimensions of the plane. The first digit is the number of seats in a row and the second digit is the number of rows on the plane.
Each subsequent line describes a group of travellers. For example, the first line of travelers describes a group of three where the first traveller has a preference for a window seat. Each number uniquely identifies the traveller on the flight.