public ArrayList<Flight> shortestFlight(String departureAirport,
			String arrivalAirport) {
		ArrayList<ArrayList<Flight>> multiHopFlights = getMultiHopFlights(
				departureAirport, arrivalAirport);
		ArrayList<Flight> nonStopFlights = getNonStopFlights(departureAirport,
				arrivalAirport);
		ArrayList<Flight> result = multiHopFlights.get(0);

		int minDistance = 0;
		/* calculate initial minimum distance */
		for (int j = 0; j < result.size(); j++) {
			minDistance += result.get(j).getDistance();
		}

		/* find minimum distance in multi hop flights */
		for (int i = 0; i < multiHopFlights.size(); i++) {
			ArrayList<Flight> path = multiHopFlights.get(i);

			/* temp distance of a path for comparing */
			int tempDis = 0;
			/* calculate the total distance for a path */
			for (int k = 0; k < path.size(); k++) {
				tempDis += path.get(k).getDistance();
			}

			if (minDistance > tempDis) {
				minDistance = tempDis;
				result = path;
			}
		}

		/* find minimum distance in non-stop flights */
		for (int m = 0; m < nonStopFlights.size(); m++) {
			if (minDistance > nonStopFlights.get(m).getDistance()) {
				minDistance = nonStopFlights.get(m).getDistance();
				/* clear result and add a new flight with minimum distance */
				result.clear();
				result.add(nonStopFlights.get(m));
			}
		}
		return result;
	}