/**
 * Geologists often work with dictionaries to store information about rocks and minerals.
 * In this exercise, you need to complete the function 'commonElements' which takes two
 * dictionaries as input and returns a list of common elements (keys) between the two dictionaries.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list of common elements (keys) between the two dictionaries.
 */
fun commonElements(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {

    // Initialize an empty list to store common elements
    val common = mutableListOf<String>()

    // Iterate over the keys in dictionary1
    for (key in dictionary1.keys) {
        // Check if the key exists in dictionary2
        if (dictionary2.containsKey(key)) {
            // Add the common element to the list
            common.add(key)
        }
    }

    return common
}
/**
 * Geologists often work with dictionaries to store information about rocks and minerals.
 * In this exercise, you need to complete the function 'commonElements' which takes two
 * dictionaries as input and returns a list of common elements (keys) between the two dictionaries.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list of common elements (keys) between the two dictionaries.
 */
fun commonElements(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {
/**
 * Geologists often work with dictionaries to store information about rocks and minerals.
 * In this exercise, you need to complete the function 'commonElements' which takes two
 * dictionaries as input and returns a list of common elements (keys) between the two dictionaries.
 *
 * @param dictionary1 The first dictionary.
 * @param dictionary2 The second dictionary.
 * @return A list of common elements (keys) between the two dictionaries.
 */
fun commonElements(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {

    // Initialize an empty list to store common elements
    val common = mutableListOf<String>()

    // Iterate over the keys in dictionary1
    for (key in dictionary1.keys) {
        // Check if the key exists in dictionary2
        if (dictionary2.containsKey(key)) {
            // Add the common element to the list
            common.add(key)
        }
    }

    return common
}