/**
 * This function takes in two strings and returns the common characters between them.
 *
 * @param str1 the first input string
 * @param str2 the second input string
 * @return a set of common characters from both strings
 */
fun findCommonCharacters(str1: String, str2: String): Set<Char> {

    val commonChars = mutableSetOf<Char>()

    // Iterate over each character in the first string
    for (char1 in str1) {
        // Iterate over each character in the second string
        for (char2 in str2) {
            // Check if the characters are the same
            if (char1 == char2) {
                // Add the common character to the set
                commonChars.add(char1)
            }
        }
    }

    return commonChars
}
/**
 * This function takes in two strings and returns the common characters between them.
 *
 * @param str1 the first input string
 * @param str2 the second input string
 * @return a set of common characters from both strings
 */
fun findCommonCharacters(str1: String, str2: String): Set<Char> {
/**
 * This function takes in two strings and returns the common characters between them.
 *
 * @param str1 the first input string
 * @param str2 the second input string
 * @return a set of common characters from both strings
 */
fun findCommonCharacters(str1: String, str2: String): Set<Char> {

    val commonChars = mutableSetOf<Char>()

    // Iterate over each character in the first string
    for (char1 in str1) {
        // Iterate over each character in the second string
        for (char2 in str2) {
            // Check if the characters are the same
            if (char1 == char2) {
                // Add the common character to the set
                commonChars.add(char1)
            }
        }
    }

    return commonChars
}