/**
 * Given two actor names, find and return the set of common characters in both names.
 *
 * @param actorName1 The first actor name.
 * @param actorName2 The second actor name.
 * @return A set containing the common characters in both actor names.
 */
fun commonCharacters(actorName1: String, actorName2: String): Set<Char> {

    // Step 1: Create a set to store the common characters
    val commonCharSet = mutableSetOf<Char>()

    // Step 2: Loop through the first actor name
    for (char in actorName1) {
        // Step 3: Check if the character exists in the second actor name
        if (char in actorName2) {
            // Step 4: Add the common character to the set
            commonCharSet.add(char)
        }
    }

    // Step 5: Return the set of common characters
    return commonCharSet
}
/**
 * Given two actor names, find and return the set of common characters in both names.
 *
 * @param actorName1 The first actor name.
 * @param actorName2 The second actor name.
 * @return A set containing the common characters in both actor names.
 */
fun commonCharacters(actorName1: String, actorName2: String): Set<Char> {
/**
 * Given two actor names, find and return the set of common characters in both names.
 *
 * @param actorName1 The first actor name.
 * @param actorName2 The second actor name.
 * @return A set containing the common characters in both actor names.
 */
fun commonCharacters(actorName1: String, actorName2: String): Set<Char> {

    // Step 1: Create a set to store the common characters
    val commonCharSet = mutableSetOf<Char>()

    // Step 2: Loop through the first actor name
    for (char in actorName1) {
        // Step 3: Check if the character exists in the second actor name
        if (char in actorName2) {
            // Step 4: Add the common character to the set
            commonCharSet.add(char)
        }
    }

    // Step 5: Return the set of common characters
    return commonCharSet
}