/**
 * Given two sequences, find the common elements between them.
 *
 * @param sequence1 First sequence of elements
 * @param sequence2 Second sequence of elements
 * @return Set containing the common elements between the two sequences
 */
fun findCommonElements(sequence1: List<Any>, sequence2: List<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    // Iterate over the first sequence
    for (element1 in sequence1) {
        // Iterate over the second sequence
        for (element2 in sequence2) {
            // Check if the elements are equal
            if (element1 == element2) {
                // Add the common element to the set
                commonElements.add(element1)
            }
        }
    }

    return commonElements
}
/**
 * Given two sequences, find the common elements between them.
 *
 * @param sequence1 First sequence of elements
 * @param sequence2 Second sequence of elements
 * @return Set containing the common elements between the two sequences
 */
fun findCommonElements(sequence1: List<Any>, sequence2: List<Any>): Set<Any> {
/**
 * Given two sequences, find the common elements between them.
 *
 * @param sequence1 First sequence of elements
 * @param sequence2 Second sequence of elements
 * @return Set containing the common elements between the two sequences
 */
fun findCommonElements(sequence1: List<Any>, sequence2: List<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    // Iterate over the first sequence
    for (element1 in sequence1) {
        // Iterate over the second sequence
        for (element2 in sequence2) {
            // Check if the elements are equal
            if (element1 == element2) {
                // Add the common element to the set
                commonElements.add(element1)
            }
        }
    }

    return commonElements
}