/**
 * Given two dictionaries, find all the common keys between them.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list containing the common keys.
 *
 * Example:
 * getCommonKeys(mapOf('a' to 1, 'b' to 2, 'c' to 3), mapOf('b' to 4, 'd' to 5, 'c' to 6))
 * Output: ['b', 'c']
 */
fun getCommonKeys(dictionary1: Map<String, Int>, dictionary2: Map<String, Int>): List<String> {

    val commonKeys = mutableListOf<String>()

    for (key1 in dictionary1.keys) {  // Iterate over the keys of dictionary1
        for (key2 in dictionary2.keys) {  // Iterate over the keys of dictionary2
            if (key1 == key2) {  // Check if the current keys are equal
                commonKeys.add(key1)  // Add the common key to the list
            }
        }
    }

    return commonKeys
}
/**
 * Given two dictionaries, find all the common keys between them.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list containing the common keys.
 *
 * Example:
 * getCommonKeys(mapOf('a' to 1, 'b' to 2, 'c' to 3), mapOf('b' to 4, 'd' to 5, 'c' to 6))
 * Output: ['b', 'c']
 */
fun getCommonKeys(dictionary1: Map<String, Int>, dictionary2: Map<String, Int>): List<String> {
/**
 * Given two dictionaries, find all the common keys between them.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list containing the common keys.
 *
 * Example:
 * getCommonKeys(mapOf('a' to 1, 'b' to 2, 'c' to 3), mapOf('b' to 4, 'd' to 5, 'c' to 6))
 * Output: ['b', 'c']
 */
fun getCommonKeys(dictionary1: Map<String, Int>, dictionary2: Map<String, Int>): List<String> {

    val commonKeys = mutableListOf<String>()

    for (key1 in dictionary1.keys) {  // Iterate over the keys of dictionary1
        for (key2 in dictionary2.keys) {  // Iterate over the keys of dictionary2
            if (key1 == key2) {  // Check if the current keys are equal
                commonKeys.add(key1)  // Add the common key to the list
            }
        }
    }

    return commonKeys
}