/**
 * This exercise requires you to find the colors that are not common between two lists.
 * Your task is to complete the function 'checkColors' which takes two lists of colors as arguments.
 * The function should return a list of colors that are unique to each list, excluding those that are common to both lists.
 * You are not allowed to use any loops (i.e., while or for loops).
 * Your solution should only involve list comprehensions and set operations.
 */
fun checkColors(color1: List<String>, color2: List<String>): Pair<List<String>, List<String>> {

    // Find the colors that are common in both lists
    val commonColors = (color1.toSet() intersect color2.toSet()).toList()

    // Find unique colors in each list, excluding common colors
    val uniqueColors1 = color1.filter { it !in commonColors }
    val uniqueColors2 = color2.filter { it !in commonColors }

    return Pair(uniqueColors1, uniqueColors2)
}
/**
 * This exercise requires you to find the colors that are not common between two lists.
 * Your task is to complete the function 'checkColors' which takes two lists of colors as arguments.
 * The function should return a list of colors that are unique to each list, excluding those that are common to both lists.
 * You are not allowed to use any loops (i.e., while or for loops).
 * Your solution should only involve list comprehensions and set operations.
 */
fun checkColors(color1: List<String>, color2: List<String>): Pair<List<String>, List<String>> {
/**
 * This exercise requires you to find the colors that are not common between two lists.
 * Your task is to complete the function 'checkColors' which takes two lists of colors as arguments.
 * The function should return a list of colors that are unique to each list, excluding those that are common to both lists.
 * You are not allowed to use any loops (i.e., while or for loops).
 * Your solution should only involve list comprehensions and set operations.
 */
fun checkColors(color1: List<String>, color2: List<String>): Pair<List<String>, List<String>> {

    // Find the colors that are common in both lists
    val commonColors = (color1.toSet() intersect color2.toSet()).toList()

    // Find unique colors in each list, excluding common colors
    val uniqueColors1 = color1.filter { it !in commonColors }
    val uniqueColors2 = color2.filter { it !in commonColors }

    return Pair(uniqueColors1, uniqueColors2)
}