/**
 * Given two dictionaries, find the common keys between them.
 *
 * @param dict1 First dictionary.
 * @param dict2 Second dictionary.
 * @return Set containing the common keys between the dictionaries.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 4, "c" to 5, "d" to 6)
 * println(commonKeys(dict1, dict2)) // Output: [b, c]
 */
fun commonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): Set<String> {

    val commonKeysSet = mutableSetOf<String>()

    for (key in dict1.keys) {
        if (dict2.containsKey(key)) {
            commonKeysSet.add(key)
        }
    }

    return commonKeysSet
}
/**
 * Given two dictionaries, find the common keys between them.
 *
 * @param dict1 First dictionary.
 * @param dict2 Second dictionary.
 * @return Set containing the common keys between the dictionaries.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 4, "c" to 5, "d" to 6)
 * println(commonKeys(dict1, dict2)) // Output: [b, c]
 */
fun commonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): Set<String> {
/**
 * Given two dictionaries, find the common keys between them.
 *
 * @param dict1 First dictionary.
 * @param dict2 Second dictionary.
 * @return Set containing the common keys between the dictionaries.
 *
 * Example:
 * val dict1 = mapOf("a" to 1, "b" to 2, "c" to 3)
 * val dict2 = mapOf("b" to 4, "c" to 5, "d" to 6)
 * println(commonKeys(dict1, dict2)) // Output: [b, c]
 */
fun commonKeys(dict1: Map<String, Int>, dict2: Map<String, Int>): Set<String> {

    val commonKeysSet = mutableSetOf<String>()

    for (key in dict1.keys) {
        if (dict2.containsKey(key)) {
            commonKeysSet.add(key)
        }
    }

    return commonKeysSet
}