/**
 * Given a dictionary, find the keys with the maximum length and return them as a list.
 *
 * Example:
 * dictionary = mapOf("apple" to 3, "banana" to 6, "cherry" to 5, "dragonfruit" to 10)
 * getKeysWithMaxLength(dictionary) -> ["dragonfruit"]
 *
 * @param dictionary A dictionary with string keys
 * @return A list of keys with the maximum length
 */
fun getKeysWithMaxLength(dictionary: Map<String, Int>): List<String> {

    val maxLength = dictionary.keys.maxByOrNull { it.length }?.length ?: 0
    return dictionary.keys.filter { it.length == maxLength }
}
/**
 * Given a dictionary, find the keys with the maximum length and return them as a list.
 *
 * Example:
 * dictionary = mapOf("apple" to 3, "banana" to 6, "cherry" to 5, "dragonfruit" to 10)
 * getKeysWithMaxLength(dictionary) -> ["dragonfruit"]
 *
 * @param dictionary A dictionary with string keys
 * @return A list of keys with the maximum length
 */
fun getKeysWithMaxLength(dictionary: Map<String, Int>): List<String> {
/**
 * Given a dictionary, find the keys with the maximum length and return them as a list.
 *
 * Example:
 * dictionary = mapOf("apple" to 3, "banana" to 6, "cherry" to 5, "dragonfruit" to 10)
 * getKeysWithMaxLength(dictionary) -> ["dragonfruit"]
 *
 * @param dictionary A dictionary with string keys
 * @return A list of keys with the maximum length
 */
fun getKeysWithMaxLength(dictionary: Map<String, Int>): List<String> {

    val maxLength = dictionary.keys.maxByOrNull { it.length }?.length ?: 0
    return dictionary.keys.filter { it.length == maxLength }
}