/**
 * This exercise requires finding the common characters between two strings using loops and repetition.
 * The function takes two strings as input and returns a list of the common characters.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return A list of common characters between the two strings.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {

    val commonChars = mutableListOf<Char>()
    for (char1 in string1) {
        for (char2 in string2) {
            if (char1 == char2 && char1 !in commonChars) {
                commonChars.add(char1)
            }
        }
    }
    return commonChars
}
/**
 * This exercise requires finding the common characters between two strings using loops and repetition.
 * The function takes two strings as input and returns a list of the common characters.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return A list of common characters between the two strings.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {
/**
 * This exercise requires finding the common characters between two strings using loops and repetition.
 * The function takes two strings as input and returns a list of the common characters.
 *
 * @param string1 The first string.
 * @param string2 The second string.
 * @return A list of common characters between the two strings.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {

    val commonChars = mutableListOf<Char>()
    for (char1 in string1) {
        for (char2 in string2) {
            if (char1 == char2 && char1 !in commonChars) {
                commonChars.add(char1)
            }
        }
    }
    return commonChars
}