/**
 * Given two dictionaries [dict1] and [dict2], finds the common keys between them.
 *
 * @param dict1 First dictionary
 * @param dict2 Second dictionary
 * @return List of common keys between [dict1] and [dict2] (sorted in ascending order)
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 100, "c" to 200, "d" to 300)
 * println(findCommonKeys(dict1, dict2)) // Output: [b, c]
 */
fun findCommonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): List<String> {

    val commonKeys = mutableListOf<String>()
    for (key in dict1.keys) {
        if (dict2.containsKey(key)) {
            commonKeys.add(key)
        }
    }
    return commonKeys.sorted()
}
/**
 * Given two dictionaries [dict1] and [dict2], finds the common keys between them.
 *
 * @param dict1 First dictionary
 * @param dict2 Second dictionary
 * @return List of common keys between [dict1] and [dict2] (sorted in ascending order)
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 100, "c" to 200, "d" to 300)
 * println(findCommonKeys(dict1, dict2)) // Output: [b, c]
 */
fun findCommonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): List<String> {
/**
 * Given two dictionaries [dict1] and [dict2], finds the common keys between them.
 *
 * @param dict1 First dictionary
 * @param dict2 Second dictionary
 * @return List of common keys between [dict1] and [dict2] (sorted in ascending order)
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 100, "c" to 200, "d" to 300)
 * println(findCommonKeys(dict1, dict2)) // Output: [b, c]
 */
fun findCommonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): List<String> {

    val commonKeys = mutableListOf<String>()
    for (key in dict1.keys) {
        if (dict2.containsKey(key)) {
            commonKeys.add(key)
        }
    }
    return commonKeys.sorted()
}