/**
 * Given a dictionary containing actors' names as keys and their respective number of movies acted as values,
 * find and return the longest name among the actors.
 *
 * @param actorDict A dictionary containing actor names and their number of movies acted
 * @return The longest name among the actors
 */
fun getLongestName(actorDict: Map<String, Int>): String {

    var longestName = ""

    // Iterate over the keys (actor names) in the dictionary
    for (actorName in actorDict.keys) {
        // If the current actor name is longer than the previous longest name, update the longestName variable
        if (actorName.length > longestName.length) {
            longestName = actorName
        }
    }

    return longestName
}
/**
 * Given a dictionary containing actors' names as keys and their respective number of movies acted as values,
 * find and return the longest name among the actors.
 *
 * @param actorDict A dictionary containing actor names and their number of movies acted
 * @return The longest name among the actors
 */
fun getLongestName(actorDict: Map<String, Int>): String {
/**
 * Given a dictionary containing actors' names as keys and their respective number of movies acted as values,
 * find and return the longest name among the actors.
 *
 * @param actorDict A dictionary containing actor names and their number of movies acted
 * @return The longest name among the actors
 */
fun getLongestName(actorDict: Map<String, Int>): String {

    var longestName = ""

    // Iterate over the keys (actor names) in the dictionary
    for (actorName in actorDict.keys) {
        // If the current actor name is longer than the previous longest name, update the longestName variable
        if (actorName.length > longestName.length) {
            longestName = actorName
        }
    }

    return longestName
}