/**
 * Write a function that takes in two dictionaries, dict1 and dict2,
 * and returns the common keys present in both dictionaries.
 *
 * @param dict1 A dictionary (keys: String, values: Int)
 * @param dict2 A dictionary (keys: String, values: Int)
 * @return A list of keys that are common in both dict1 and dict2.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("a" to 2, "b" to 4, "d" to 6)
 * findCommonKeys(dict1, dict2) // Output: ["a", "b"]
 */
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
}
/**
 * Write a function that takes in two dictionaries, dict1 and dict2,
 * and returns the common keys present in both dictionaries.
 *
 * @param dict1 A dictionary (keys: String, values: Int)
 * @param dict2 A dictionary (keys: String, values: Int)
 * @return A list of keys that are common in both dict1 and dict2.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("a" to 2, "b" to 4, "d" to 6)
 * findCommonKeys(dict1, dict2) // Output: ["a", "b"]
 */
fun findCommonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): List<String> {
/**
 * Write a function that takes in two dictionaries, dict1 and dict2,
 * and returns the common keys present in both dictionaries.
 *
 * @param dict1 A dictionary (keys: String, values: Int)
 * @param dict2 A dictionary (keys: String, values: Int)
 * @return A list of keys that are common in both dict1 and dict2.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("a" to 2, "b" to 4, "d" to 6)
 * findCommonKeys(dict1, dict2) // Output: ["a", "b"]
 */
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
}