/**
 * This function takes two strings as input and returns a list of common letters present in both strings.
 */
fun findCommonLetters(string1: String, string2: String): List<Char> {

    val commonLetters = mutableListOf<Char>()

    // Iterate through each letter in the first string
    for (letter in string1) {
        // Check if the letter is present in both strings
        if (letter in string2 && letter !in commonLetters) {
            commonLetters.add(letter)
        }
    }

    return commonLetters
}
/**
 * This function takes two strings as input and returns a list of common letters present in both strings.
 */
fun findCommonLetters(string1: String, string2: String): List<Char> {
/**
 * This function takes two strings as input and returns a list of common letters present in both strings.
 */
fun findCommonLetters(string1: String, string2: String): List<Char> {

    val commonLetters = mutableListOf<Char>()

    // Iterate through each letter in the first string
    for (letter in string1) {
        // Check if the letter is present in both strings
        if (letter in string2 && letter !in commonLetters) {
            commonLetters.add(letter)
        }
    }

    return commonLetters
}