/**
 * Given two strings, this function returns a sorted list of characters that are present in both strings.
 *
 * @param s1 First string.
 * @param s2 Second string.
 * @return Sorted list of common characters between the two strings.
 */
fun findCommonCharacters(s1: String, s2: String): List<Char> {

    val commonChars = mutableListOf<Char>()

    for (char1 in s1) {
        if (char1 in s2 && char1 !in commonChars) {
            commonChars.add(char1)
        }
    }

    return commonChars.sorted()
}
/**
 * Given two strings, this function returns a sorted list of characters that are present in both strings.
 *
 * @param s1 First string.
 * @param s2 Second string.
 * @return Sorted list of common characters between the two strings.
 */
fun findCommonCharacters(s1: String, s2: String): List<Char> {
/**
 * Given two strings, this function returns a sorted list of characters that are present in both strings.
 *
 * @param s1 First string.
 * @param s2 Second string.
 * @return Sorted list of common characters between the two strings.
 */
fun findCommonCharacters(s1: String, s2: String): List<Char> {

    val commonChars = mutableListOf<Char>()

    for (char1 in s1) {
        if (char1 in s2 && char1 !in commonChars) {
            commonChars.add(char1)
        }
    }

    return commonChars.sorted()
}