/**
 * Given two dictionaries, find the common elements between them.
 *
 * @param dict1 The first dictionary.
 * @param dict2 The second dictionary.
 * @return A list containing the common elements found in both dictionaries.
 *
 * Example:
 * findCommonElements(mapOf("a" to true, "b" to false, "c" to true), mapOf("a" to true, "c" to false, "d" to true))
 * // Output: ["a"]
 */
fun findCommonElements(dict1: Map<String, Boolean>, dict2: Map<String, Boolean>): List<String> {

    val commonElements = mutableListOf<String>()

    for ((key, value) in dict1) {
        if (dict2.containsKey(key) && dict2[key] == value) {
            commonElements.add(key)
        }
    }

    return commonElements
}
/**
 * Given two dictionaries, find the common elements between them.
 *
 * @param dict1 The first dictionary.
 * @param dict2 The second dictionary.
 * @return A list containing the common elements found in both dictionaries.
 *
 * Example:
 * findCommonElements(mapOf("a" to true, "b" to false, "c" to true), mapOf("a" to true, "c" to false, "d" to true))
 * // Output: ["a"]
 */
fun findCommonElements(dict1: Map<String, Boolean>, dict2: Map<String, Boolean>): List<String> {
/**
 * Given two dictionaries, find the common elements between them.
 *
 * @param dict1 The first dictionary.
 * @param dict2 The second dictionary.
 * @return A list containing the common elements found in both dictionaries.
 *
 * Example:
 * findCommonElements(mapOf("a" to true, "b" to false, "c" to true), mapOf("a" to true, "c" to false, "d" to true))
 * // Output: ["a"]
 */
fun findCommonElements(dict1: Map<String, Boolean>, dict2: Map<String, Boolean>): List<String> {

    val commonElements = mutableListOf<String>()

    for ((key, value) in dict1) {
        if (dict2.containsKey(key) && dict2[key] == value) {
            commonElements.add(key)
        }
    }

    return commonElements
}