public static int Task1(List <string> path) { var journey = new Journey(); path.ForEach(stage => journey.Travel(stage)); return(journey.DistanceFromStart()); }
public static int Task2(List <string> path) { var journey = new Journey(); var max = int.MinValue; foreach (var stage in path) { journey.Travel(stage); max = Math.Max(max, journey.DistanceFromStart()); } return(max); }