/**
 * Given two sets, return the intersection of the sets using the 'AND' operator and then convert the intersection
 * result into different data structures, including a list, tuple, and dictionary.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A dictionary containing the intersection converted into different data structures.
 */
fun intersectionAndConversion(set1: Set<*>, set2: Set<*>): Map<String, Any> {

    // Find the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Convert the intersection into different data structures
    val intersectionList = intersection.toList()
    val intersectionTuple = intersection.toTypedArray()
    val intersectionDict = intersection.associateWith { null }

    return mapOf(
        "list" to intersectionList,
        "tuple" to intersectionTuple,
        "dictionary" to intersectionDict
    )
}
/**
 * Given two sets, return the intersection of the sets using the 'AND' operator and then convert the intersection
 * result into different data structures, including a list, tuple, and dictionary.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A dictionary containing the intersection converted into different data structures.
 */
fun intersectionAndConversion(set1: Set<*>, set2: Set<*>): Map<String, Any> {
/**
 * Given two sets, return the intersection of the sets using the 'AND' operator and then convert the intersection
 * result into different data structures, including a list, tuple, and dictionary.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A dictionary containing the intersection converted into different data structures.
 */
fun intersectionAndConversion(set1: Set<*>, set2: Set<*>): Map<String, Any> {

    // Find the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Convert the intersection into different data structures
    val intersectionList = intersection.toList()
    val intersectionTuple = intersection.toTypedArray()
    val intersectionDict = intersection.associateWith { null }

    return mapOf(
        "list" to intersectionList,
        "tuple" to intersectionTuple,
        "dictionary" to intersectionDict
    )
}