/**
 * This function takes in a list of aircraft data and returns the maximum speed among all the aircraft.
 *
 * @param aircraftData A list of pairs where each pair contains the aircraft name (String) and its speed (Float).
 * @return The maximum speed among all the aircraft in the given data.
 *
 * Note:
 * - Speed values can be negative or positive.
 */
fun findMaxSpeed(aircraftData: List<Pair<String, Float>>): Float {

    var maxSpeed = Float.NEGATIVE_INFINITY
    for (aircraft in aircraftData) {
        val speed = aircraft.second
        if (speed > maxSpeed) {
            maxSpeed = speed
        }
        if (speed < 0) {
            break
        }
    }
    return maxSpeed
}
/**
 * This function takes in a list of aircraft data and returns the maximum speed among all the aircraft.
 *
 * @param aircraftData A list of pairs where each pair contains the aircraft name (String) and its speed (Float).
 * @return The maximum speed among all the aircraft in the given data.
 *
 * Note:
 * - Speed values can be negative or positive.
 */
fun findMaxSpeed(aircraftData: List<Pair<String, Float>>): Float {
/**
 * This function takes in a list of aircraft data and returns the maximum speed among all the aircraft.
 *
 * @param aircraftData A list of pairs where each pair contains the aircraft name (String) and its speed (Float).
 * @return The maximum speed among all the aircraft in the given data.
 *
 * Note:
 * - Speed values can be negative or positive.
 */
fun findMaxSpeed(aircraftData: List<Pair<String, Float>>): Float {

    var maxSpeed = Float.NEGATIVE_INFINITY
    for (aircraft in aircraftData) {
        val speed = aircraft.second
        if (speed > maxSpeed) {
            maxSpeed = speed
        }
        if (speed < 0) {
            break
        }
    }
    return maxSpeed
}