/**
 * Given a string and a list of characters, this function returns a new list
 * containing the characters present in the string.
 */
fun findCharactersInString(string: String, characters: List<Char>): List<Char> {

    val foundCharacters = mutableListOf<Char>()

    for (character in characters) {
        for (i in string.indices) {
            if (string[i] == character) {
                foundCharacters.add(character)
            }
        }
    }

    return foundCharacters
}
/**
 * Given a string and a list of characters, this function returns a new list
 * containing the characters present in the string.
 */
fun findCharactersInString(string: String, characters: List<Char>): List<Char> {
/**
 * Given a string and a list of characters, this function returns a new list
 * containing the characters present in the string.
 */
fun findCharactersInString(string: String, characters: List<Char>): List<Char> {

    val foundCharacters = mutableListOf<Char>()

    for (character in characters) {
        for (i in string.indices) {
            if (string[i] == character) {
                foundCharacters.add(character)
            }
        }
    }

    return foundCharacters
}