/**
 * Given a dictionary, filter out the key-value pairs that do not satisfy a given condition.
 *
 * @param dictionary The input dictionary.
 * @param condition The condition to be checked.
 * @return Filtered dictionary containing only the key-value pairs that satisfy the condition.
 */
fun filterDict(dictionary: Map<String, Int>, condition: (String, Int) -> Boolean): Map<String, Int> {

    val filteredDict = mutableMapOf<String, Int>()

    for ((key, value) in dictionary) {
        if (condition(key, value)) {
            filteredDict[key] = value
        }
    }

    return filteredDict
}

fun multiplyDictValues(employeeAge: Map<String, Int>, factor: Int): Map<String, Int> {
    val modifiedDict = employeeAge.mapValues { it.value * factor }
    return modifiedDict
}
/**
 * Given a dictionary, filter out the key-value pairs that do not satisfy a given condition.
 *
 * @param dictionary The input dictionary.
 * @param condition The condition to be checked.
 * @return Filtered dictionary containing only the key-value pairs that satisfy the condition.
 */
fun filterDict(dictionary: Map<String, Int>, condition: (String, Int) -> Boolean): Map<String, Int> {
/**
 * Given a dictionary, filter out the key-value pairs that do not satisfy a given condition.
 *
 * @param dictionary The input dictionary.
 * @param condition The condition to be checked.
 * @return Filtered dictionary containing only the key-value pairs that satisfy the condition.
 */
fun filterDict(dictionary: Map<String, Int>, condition: (String, Int) -> Boolean): Map<String, Int> {

    val filteredDict = mutableMapOf<String, Int>()

    for ((key, value) in dictionary) {
        if (condition(key, value)) {
            filteredDict[key] = value
        }
    }

    return filteredDict
}

fun multiplyDictValues(employeeAge: Map<String, Int>, factor: Int): Map<String, Int> {
    val modifiedDict = employeeAge.mapValues { it.value * factor }
    return modifiedDict
}