/**
 * You are working as an interior designer and you have two tuples containing the measurements of two different rooms.
 * Your task is to find the common measurements between the two rooms and determine if they are equal.
 *
 * @param t1 The measurements of room 1 in the format (length, width, height)
 * @param t2 The measurements of room 2 in the format (length, width, height)
 * @return A boolean indicating whether the common measurements of the two rooms are equal or not.
 */
fun intersectionOfTuplesAndEqual(t1: Triple<Int, Int, Int>, t2: Triple<Int, Int, Int>): Boolean {

    // Find the intersection of the two tuples
    val intersection = setOf(t1.first, t1.second, t1.third) intersect setOf(t2.first, t2.second, t2.third)

    // Check if all common measurements are equal
    return when {
        intersection.isEmpty() -> false
        intersection.size == 1 -> true
        else -> {
            val firstMeasurement = intersection.first()
            return intersection.all { it == firstMeasurement }
        }
    }
}
/**
 * You are working as an interior designer and you have two tuples containing the measurements of two different rooms.
 * Your task is to find the common measurements between the two rooms and determine if they are equal.
 *
 * @param t1 The measurements of room 1 in the format (length, width, height)
 * @param t2 The measurements of room 2 in the format (length, width, height)
 * @return A boolean indicating whether the common measurements of the two rooms are equal or not.
 */
fun intersectionOfTuplesAndEqual(t1: Triple<Int, Int, Int>, t2: Triple<Int, Int, Int>): Boolean {
/**
 * You are working as an interior designer and you have two tuples containing the measurements of two different rooms.
 * Your task is to find the common measurements between the two rooms and determine if they are equal.
 *
 * @param t1 The measurements of room 1 in the format (length, width, height)
 * @param t2 The measurements of room 2 in the format (length, width, height)
 * @return A boolean indicating whether the common measurements of the two rooms are equal or not.
 */
fun intersectionOfTuplesAndEqual(t1: Triple<Int, Int, Int>, t2: Triple<Int, Int, Int>): Boolean {

    // Find the intersection of the two tuples
    val intersection = setOf(t1.first, t1.second, t1.third) intersect setOf(t2.first, t2.second, t2.third)

    // Check if all common measurements are equal
    return when {
        intersection.isEmpty() -> false
        intersection.size == 1 -> true
        else -> {
            val firstMeasurement = intersection.first()
            return intersection.all { it == firstMeasurement }
        }
    }
}