/**
 * This exercise requires creating a function that takes in two dictionaries and returns a list of common keys found in both dictionaries.
 * The function should iterate through the first dictionary using a for loop and check if each key is present in the second dictionary.
 * If a key is found in both dictionaries, it should be added to a list and returned at the end.
 *
 * @param dictionary1 First dictionary to compare
 * @param dictionary2 Second dictionary to compare
 * @return A list of common keys found in both dictionaries
 */
fun findCommonKeys(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {

    val commonKeys = mutableListOf<String>()

    for (key in dictionary1.keys) {
        if (dictionary2.containsKey(key)) {
            commonKeys.add(key)
        }
    }

    return commonKeys
}
/**
 * This exercise requires creating a function that takes in two dictionaries and returns a list of common keys found in both dictionaries.
 * The function should iterate through the first dictionary using a for loop and check if each key is present in the second dictionary.
 * If a key is found in both dictionaries, it should be added to a list and returned at the end.
 *
 * @param dictionary1 First dictionary to compare
 * @param dictionary2 Second dictionary to compare
 * @return A list of common keys found in both dictionaries
 */
fun findCommonKeys(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {
/**
 * This exercise requires creating a function that takes in two dictionaries and returns a list of common keys found in both dictionaries.
 * The function should iterate through the first dictionary using a for loop and check if each key is present in the second dictionary.
 * If a key is found in both dictionaries, it should be added to a list and returned at the end.
 *
 * @param dictionary1 First dictionary to compare
 * @param dictionary2 Second dictionary to compare
 * @return A list of common keys found in both dictionaries
 */
fun findCommonKeys(dictionary1: Map<String, Any>, dictionary2: Map<String, Any>): List<String> {

    val commonKeys = mutableListOf<String>()

    for (key in dictionary1.keys) {
        if (dictionary2.containsKey(key)) {
            commonKeys.add(key)
        }
    }

    return commonKeys
}