/**
 * This function takes a set and a list as arguments, and returns the intersecting elements between them.
 *
 * @param set1 The first set.
 * @param list1 The first list.
 * @return The set containing the intersecting elements.
 *
 * Example:
 * intersectionOfSetAndList(setOf(1, 2, 3), listOf(2, 3, 4)) // Output: setOf(2, 3)
 */
fun intersectionOfSetAndList(set1: Set<Int>, list1: List<Int>): Set<Int> {

    // Using the intersect() function to find the common elements between the set and list
    return set1.intersect(list1)
}
/**
 * This function takes a set and a list as arguments, and returns the intersecting elements between them.
 *
 * @param set1 The first set.
 * @param list1 The first list.
 * @return The set containing the intersecting elements.
 *
 * Example:
 * intersectionOfSetAndList(setOf(1, 2, 3), listOf(2, 3, 4)) // Output: setOf(2, 3)
 */
fun intersectionOfSetAndList(set1: Set<Int>, list1: List<Int>): Set<Int> {
/**
 * This function takes a set and a list as arguments, and returns the intersecting elements between them.
 *
 * @param set1 The first set.
 * @param list1 The first list.
 * @return The set containing the intersecting elements.
 *
 * Example:
 * intersectionOfSetAndList(setOf(1, 2, 3), listOf(2, 3, 4)) // Output: setOf(2, 3)
 */
fun intersectionOfSetAndList(set1: Set<Int>, list1: List<Int>): Set<Int> {

    // Using the intersect() function to find the common elements between the set and list
    return set1.intersect(list1)
}