/**
 * This function takes two lists - names and salaries, and returns the name of the actor/actress with the highest salary.
 *
 * @param names List of names of the actors/actresses.
 * @param salaries List of corresponding salaries.
 * @return The name of the actor/actress with the highest salary.
 */
fun findHighestSalary(names: List<String>, salaries: List<Double>): String {

    var highestSalary = Double.NEGATIVE_INFINITY  // Initialize the highest salary as negative infinity
    var highestSalaryIndex = -1  // Initialize the index of the actor/actress with the highest salary

    for (i in salaries.indices) {
        if (salaries[i] > highestSalary) {  // Check if current salary is higher than highest recorded salary
            highestSalary = salaries[i]  // Update highest salary
            highestSalaryIndex = i  // Update index of the actor/actress with the highest salary
        }
    }

    return names[highestSalaryIndex]  // Return the name of the actor/actress with the highest salary
}
/**
 * This function takes two lists - names and salaries, and returns the name of the actor/actress with the highest salary.
 *
 * @param names List of names of the actors/actresses.
 * @param salaries List of corresponding salaries.
 * @return The name of the actor/actress with the highest salary.
 */
fun findHighestSalary(names: List<String>, salaries: List<Double>): String {
/**
 * This function takes two lists - names and salaries, and returns the name of the actor/actress with the highest salary.
 *
 * @param names List of names of the actors/actresses.
 * @param salaries List of corresponding salaries.
 * @return The name of the actor/actress with the highest salary.
 */
fun findHighestSalary(names: List<String>, salaries: List<Double>): String {

    var highestSalary = Double.NEGATIVE_INFINITY  // Initialize the highest salary as negative infinity
    var highestSalaryIndex = -1  // Initialize the index of the actor/actress with the highest salary

    for (i in salaries.indices) {
        if (salaries[i] > highestSalary) {  // Check if current salary is higher than highest recorded salary
            highestSalary = salaries[i]  // Update highest salary
            highestSalaryIndex = i  // Update index of the actor/actress with the highest salary
        }
    }

    return names[highestSalaryIndex]  // Return the name of the actor/actress with the highest salary
}