/**
 * Given a list of athletes, return a list of the top 3 fastest athletes.
 *
 * Each athlete is represented as a Pair containing their name and their speed in meters per second.
 *
 * Example:
 * athletes = listOf(Pair("John", 9.8), Pair("Sarah", 9.5), Pair("Michael", 9.2), Pair("Jessica", 10.0))
 * getFastestAthletes(athletes) => listOf(Pair("Michael", 9.2), Pair("Sarah", 9.5), Pair("John", 9.8))
 */
fun getFastestAthletes(athletes: List<Pair<String, Double>>): List<Pair<String, Double>> {

    // Sort the athletes based on speed in ascending order
    val sortedAthletes = athletes.sortedBy { it.second }

    // Return the top 3 fastest athletes by slicing the sorted list
    return sortedAthletes.take(3)
}
/**
 * Given a list of athletes, return a list of the top 3 fastest athletes.
 *
 * Each athlete is represented as a Pair containing their name and their speed in meters per second.
 *
 * Example:
 * athletes = listOf(Pair("John", 9.8), Pair("Sarah", 9.5), Pair("Michael", 9.2), Pair("Jessica", 10.0))
 * getFastestAthletes(athletes) => listOf(Pair("Michael", 9.2), Pair("Sarah", 9.5), Pair("John", 9.8))
 */
fun getFastestAthletes(athletes: List<Pair<String, Double>>): List<Pair<String, Double>> {
/**
 * Given a list of athletes, return a list of the top 3 fastest athletes.
 *
 * Each athlete is represented as a Pair containing their name and their speed in meters per second.
 *
 * Example:
 * athletes = listOf(Pair("John", 9.8), Pair("Sarah", 9.5), Pair("Michael", 9.2), Pair("Jessica", 10.0))
 * getFastestAthletes(athletes) => listOf(Pair("Michael", 9.2), Pair("Sarah", 9.5), Pair("John", 9.8))
 */
fun getFastestAthletes(athletes: List<Pair<String, Double>>): List<Pair<String, Double>> {

    // Sort the athletes based on speed in ascending order
    val sortedAthletes = athletes.sortedBy { it.second }

    // Return the top 3 fastest athletes by slicing the sorted list
    return sortedAthletes.take(3)
}