/**
 * Given a list of athletes with their respective speeds, return the fastest runner.
 *
 * @param athletes A list of pairs containing the name and speed of each athlete.
 *                 Speed is measured in meters per second.
 * @return The name of the fastest runner.
 *
 * Example:
 * athletes = listOf(Pair("Tom", 10), Pair("Jerry", 12), Pair("Bob", 8), Pair("Alice", 9))
 * findFastestRunner(athletes) // Output: "Jerry"
 */
fun findFastestRunner(athletes: List<Pair<String, Int>>): String {

    var fastestRunner = ""
    var highestSpeed = Int.MIN_VALUE

    for (athlete in athletes) {
        val name = athlete.first
        val speed = athlete.second

        if (speed > highestSpeed) {
            fastestRunner = name
            highestSpeed = speed
        }
    }

    return fastestRunner
}
/**
 * Given a list of athletes with their respective speeds, return the fastest runner.
 *
 * @param athletes A list of pairs containing the name and speed of each athlete.
 *                 Speed is measured in meters per second.
 * @return The name of the fastest runner.
 *
 * Example:
 * athletes = listOf(Pair("Tom", 10), Pair("Jerry", 12), Pair("Bob", 8), Pair("Alice", 9))
 * findFastestRunner(athletes) // Output: "Jerry"
 */
fun findFastestRunner(athletes: List<Pair<String, Int>>): String {
/**
 * Given a list of athletes with their respective speeds, return the fastest runner.
 *
 * @param athletes A list of pairs containing the name and speed of each athlete.
 *                 Speed is measured in meters per second.
 * @return The name of the fastest runner.
 *
 * Example:
 * athletes = listOf(Pair("Tom", 10), Pair("Jerry", 12), Pair("Bob", 8), Pair("Alice", 9))
 * findFastestRunner(athletes) // Output: "Jerry"
 */
fun findFastestRunner(athletes: List<Pair<String, Int>>): String {

    var fastestRunner = ""
    var highestSpeed = Int.MIN_VALUE

    for (athlete in athletes) {
        val name = athlete.first
        val speed = athlete.second

        if (speed > highestSpeed) {
            fastestRunner = name
            highestSpeed = speed
        }
    }

    return fastestRunner
}