/**
 * Given two strings, find and return a list of common characters (case-sensitive) present in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return A list of common characters in both strings.
 */
fun findCommonCharacters(str1: String, str2: String): List<Char> {

    val commonChars = mutableListOf<Char>()
    for (char in str1) {
        if (char in str2 && char !in commonChars) {
            commonChars.add(char)
        }
    }
    return commonChars
}
/**
 * Given two strings, find and return a list of common characters (case-sensitive) present in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return A list of common characters in both strings.
 */
fun findCommonCharacters(str1: String, str2: String): List<Char> {
/**
 * Given two strings, find and return a list of common characters (case-sensitive) present in both strings.
 *
 * @param str1 The first input string.
 * @param str2 The second input string.
 * @return A list of common characters in both strings.
 */
fun findCommonCharacters(str1: String, str2: String): List<Char> {

    val commonChars = mutableListOf<Char>()
    for (char in str1) {
        if (char in str2 && char !in commonChars) {
            commonChars.add(char)
        }
    }
    return commonChars
}