/**
 * Given two strings, find the common characters between them.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {

    val commonCharacters = mutableListOf<Char>()
    for (char in string1) {
        if (char in string2 && char !in commonCharacters) {
            commonCharacters.add(char)
        }
    }
    return commonCharacters
}
/**
 * Given two strings, find the common characters between them.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {
/**
 * Given two strings, find the common characters between them.
 */
fun findCommonCharacters(string1: String, string2: String): List<Char> {

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