/**
 * Given two lists, find the common letters between them and return a new list with those letters.
 *
 * @param list1 List containing some letters (can be upper case or lower case)
 * @param list2 List containing some letters (can be upper case or lower case)
 * @return List containing the common letters between list1 and list2.
 */
fun findCommonLetters(list1: List<Char>, list2: List<Char>): List<Char> {

    val commonLetters = mutableListOf<Char>()
    for (letter in list1) {
        if (letter.isLetter()) {
            for (character in list2) {
                if (character.equals(letter, ignoreCase = true)) {
                    commonLetters.add(letter)
                    break
                }
            }
        }
    }
    return commonLetters
}
/**
 * Given two lists, find the common letters between them and return a new list with those letters.
 *
 * @param list1 List containing some letters (can be upper case or lower case)
 * @param list2 List containing some letters (can be upper case or lower case)
 * @return List containing the common letters between list1 and list2.
 */
fun findCommonLetters(list1: List<Char>, list2: List<Char>): List<Char> {
/**
 * Given two lists, find the common letters between them and return a new list with those letters.
 *
 * @param list1 List containing some letters (can be upper case or lower case)
 * @param list2 List containing some letters (can be upper case or lower case)
 * @return List containing the common letters between list1 and list2.
 */
fun findCommonLetters(list1: List<Char>, list2: List<Char>): List<Char> {

    val commonLetters = mutableListOf<Char>()
    for (letter in list1) {
        if (letter.isLetter()) {
            for (character in list2) {
                if (character.equals(letter, ignoreCase = true)) {
                    commonLetters.add(letter)
                    break
                }
            }
        }
    }
    return commonLetters
}