/**
 * Modify the given dictionary by finding the intersection of two provided keys and return the modified dictionary.
 *
 * @param actorDict A dictionary containing actor names and their respective number of movies.
 * @param key1 The first key to find the intersection.
 * @param key2 The second key to find the intersection.
 * @return The modified dictionary after performing the intersection of the two provided keys.
 */
fun findIntersection(actorDict: MutableMap<String, Int>, key1: String, key2: String): MutableMap<String, Int> {

    // Find the intersection of key1 and key2 and update the dictionary accordingly
    actorDict[key1] = actorDict.getOrDefault(key1, 0) and actorDict.getOrDefault(key2, 0)
    actorDict[key2] = actorDict.getOrDefault(key2, 0) and actorDict.getOrDefault(key1, 0)
    
    return actorDict
}
/**
 * Modify the given dictionary by finding the intersection of two provided keys and return the modified dictionary.
 *
 * @param actorDict A dictionary containing actor names and their respective number of movies.
 * @param key1 The first key to find the intersection.
 * @param key2 The second key to find the intersection.
 * @return The modified dictionary after performing the intersection of the two provided keys.
 */
fun findIntersection(actorDict: MutableMap<String, Int>, key1: String, key2: String): MutableMap<String, Int> {
/**
 * Modify the given dictionary by finding the intersection of two provided keys and return the modified dictionary.
 *
 * @param actorDict A dictionary containing actor names and their respective number of movies.
 * @param key1 The first key to find the intersection.
 * @param key2 The second key to find the intersection.
 * @return The modified dictionary after performing the intersection of the two provided keys.
 */
fun findIntersection(actorDict: MutableMap<String, Int>, key1: String, key2: String): MutableMap<String, Int> {

    // Find the intersection of key1 and key2 and update the dictionary accordingly
    actorDict[key1] = actorDict.getOrDefault(key1, 0) and actorDict.getOrDefault(key2, 0)
    actorDict[key2] = actorDict.getOrDefault(key2, 0) and actorDict.getOrDefault(key1, 0)
    
    return actorDict
}