/**
 * This function sorts a dictionary in ascending order of values and returns a list of keys.
 *
 * @param dictionary A dictionary with string keys and integer values.
 * @return A list of keys in ascending order of their respective values.
 *
 * Example:
 * val dictionary = mapOf("A" to 5, "B" to 2, "C" to 7)
 * sortDictionary(dictionary) // Output: ['B', 'A', 'C']
 */
fun sortDictionary(dictionary: Map<String, Int>): List<String> {

    val sortedKeys = dictionary.entries.sortedBy { it.value }.map { it.key }
    return sortedKeys
}
/**
 * This function sorts a dictionary in ascending order of values and returns a list of keys.
 *
 * @param dictionary A dictionary with string keys and integer values.
 * @return A list of keys in ascending order of their respective values.
 *
 * Example:
 * val dictionary = mapOf("A" to 5, "B" to 2, "C" to 7)
 * sortDictionary(dictionary) // Output: ['B', 'A', 'C']
 */
fun sortDictionary(dictionary: Map<String, Int>): List<String> {
/**
 * This function sorts a dictionary in ascending order of values and returns a list of keys.
 *
 * @param dictionary A dictionary with string keys and integer values.
 * @return A list of keys in ascending order of their respective values.
 *
 * Example:
 * val dictionary = mapOf("A" to 5, "B" to 2, "C" to 7)
 * sortDictionary(dictionary) // Output: ['B', 'A', 'C']
 */
fun sortDictionary(dictionary: Map<String, Int>): List<String> {

    val sortedKeys = dictionary.entries.sortedBy { it.value }.map { it.key }
    return sortedKeys
}