/**
 * Given a dictionary of word counts, this function finds the words that have the maximum count of a specific character.
 * Returns a list of words with the maximum count.
 */
fun findWordsWithMaxCount(counts: Map<String, Int>): List<String> {

    val maxCount = counts.values.maxOrNull() ?: 0
    val wordsWithMaxCount = mutableListOf<String>()

    for ((word, count) in counts) {
        if (count == maxCount) {
            wordsWithMaxCount.add(word)
        }
    }

    return wordsWithMaxCount
}
/**
 * Given a dictionary of word counts, this function finds the words that have the maximum count of a specific character.
 * Returns a list of words with the maximum count.
 */
fun findWordsWithMaxCount(counts: Map<String, Int>): List<String> {
/**
 * Given a dictionary of word counts, this function finds the words that have the maximum count of a specific character.
 * Returns a list of words with the maximum count.
 */
fun findWordsWithMaxCount(counts: Map<String, Int>): List<String> {

    val maxCount = counts.values.maxOrNull() ?: 0
    val wordsWithMaxCount = mutableListOf<String>()

    for ((word, count) in counts) {
        if (count == maxCount) {
            wordsWithMaxCount.add(word)
        }
    }

    return wordsWithMaxCount
}