/**
 * This exercise requires iterating through a set and accessing values in a dictionary.
 * The goal is to find the elements present in both the set and the dictionary.
 *
 * @param similarSet A set containing elements.
 * @param dictionary A dictionary with keys and values.
 * @return A list of elements that are present in both the set and the dictionary.
 */
fun presentCircuit(similarSet: Set<String>, dictionary: Map<String, String>): List<String> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<String>()
    
    // Iterate through the elements in the set
    for (element in similarSet) {
        // Check if the element is a key in the dictionary
        if (element in dictionary) {
            // Add the element to the list if it is present in the dictionary
            commonElements.add(element)
        }
    }
    
    // Return the list of common elements
    return commonElements
}
/**
 * This exercise requires iterating through a set and accessing values in a dictionary.
 * The goal is to find the elements present in both the set and the dictionary.
 *
 * @param similarSet A set containing elements.
 * @param dictionary A dictionary with keys and values.
 * @return A list of elements that are present in both the set and the dictionary.
 */
fun presentCircuit(similarSet: Set<String>, dictionary: Map<String, String>): List<String> {
/**
 * This exercise requires iterating through a set and accessing values in a dictionary.
 * The goal is to find the elements present in both the set and the dictionary.
 *
 * @param similarSet A set containing elements.
 * @param dictionary A dictionary with keys and values.
 * @return A list of elements that are present in both the set and the dictionary.
 */
fun presentCircuit(similarSet: Set<String>, dictionary: Map<String, String>): List<String> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<String>()
    
    // Iterate through the elements in the set
    for (element in similarSet) {
        // Check if the element is a key in the dictionary
        if (element in dictionary) {
            // Add the element to the list if it is present in the dictionary
            commonElements.add(element)
        }
    }
    
    // Return the list of common elements
    return commonElements
}