/**
 * Given a dictionary, iterate over each character of each key in the dictionary
 * and return a list of all the characters found.
 *
 * @param dictionary The dictionary to be analyzed.
 * @return A list containing all the characters found in the keys of the dictionary.
 *
 * Example:
 * val dictionary = mapOf("key1" to "apple", "key2" to "banana")
 * getDictionaryChars(dictionary)
 * Output: ['k', 'e', 'y', '1', 'a', 'p', 'l', 'b', 'n']
 */
fun getDictionaryChars(dictionary: Map<String, String>): List<Char> {

    val charList = mutableListOf<Char>()

    // Iterate over each key in the dictionary
    for (key in dictionary.keys) {
        // Iterate over each character in the key
        for (char in key) {
            charList.add(char)
        }
    }

    return charList
}
/**
 * Given a dictionary, iterate over each character of each key in the dictionary
 * and return a list of all the characters found.
 *
 * @param dictionary The dictionary to be analyzed.
 * @return A list containing all the characters found in the keys of the dictionary.
 *
 * Example:
 * val dictionary = mapOf("key1" to "apple", "key2" to "banana")
 * getDictionaryChars(dictionary)
 * Output: ['k', 'e', 'y', '1', 'a', 'p', 'l', 'b', 'n']
 */
fun getDictionaryChars(dictionary: Map<String, String>): List<Char> {
/**
 * Given a dictionary, iterate over each character of each key in the dictionary
 * and return a list of all the characters found.
 *
 * @param dictionary The dictionary to be analyzed.
 * @return A list containing all the characters found in the keys of the dictionary.
 *
 * Example:
 * val dictionary = mapOf("key1" to "apple", "key2" to "banana")
 * getDictionaryChars(dictionary)
 * Output: ['k', 'e', 'y', '1', 'a', 'p', 'l', 'b', 'n']
 */
fun getDictionaryChars(dictionary: Map<String, String>): List<Char> {

    val charList = mutableListOf<Char>()

    // Iterate over each key in the dictionary
    for (key in dictionary.keys) {
        // Iterate over each character in the key
        for (char in key) {
            charList.add(char)
        }
    }

    return charList
}