graph: Adjust calculation to match exercise

This commit is contained in:
Marco Thomas
2022-07-27 14:32:37 +02:00
parent 0b29bdab3d
commit d6a8689175
6 changed files with 183 additions and 90 deletions

View File

@@ -68,7 +68,11 @@ def parse(filename: str) -> DataSet:
stops = splitted[2]
else:
stops = 0
flights.update({id1: {"to": id2, "stops": stops}})
if len(splitted) == 4:
domestic = True
else:
domestic = False
flights.update({id1: {"to": id2, "stops": stops, "domestic": domestic}})
continue
case ParsingMode.FINDCONNECTION:
print("Parsing connection...")