/**
 * Dancer is a tuple containing the name of the dancer and a list of their heights.
 * heights is a list of integers representing the heights of the dancer in centimeters.
 *
 * In this exercise, you need to find the dancers with heights not equal to 160 cm and create a new tuple
 * with their names. The new tuple should be sorted in alphabetical order.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionOfNotOperatorAndCreatingTuple(dancerName: String, dancerHeights: List<Pair<String, Int>>): List<String> {

    // Create an empty list to store the names of the dancers
    val dancersWithDifferentHeights = mutableListOf<String>()

    // Iterate over the elements in the dancerHeights list
    for (dancer in dancerHeights) {
        val height = dancer.second

        // Check if the height is not equal to 160 cm
        if (height != 160) {
            // Append the dancer's name to the list
            dancersWithDifferentHeights.add(dancer.first)
        }
    }

    // Sort the names alphabetically
    val sortedDancers = dancersWithDifferentHeights.sorted()

    return sortedDancers
}
/**
 * Dancer is a tuple containing the name of the dancer and a list of their heights.
 * heights is a list of integers representing the heights of the dancer in centimeters.
 *
 * In this exercise, you need to find the dancers with heights not equal to 160 cm and create a new tuple
 * with their names. The new tuple should be sorted in alphabetical order.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionOfNotOperatorAndCreatingTuple(dancerName: String, dancerHeights: List<Pair<String, Int>>): List<String> {
/**
 * Dancer is a tuple containing the name of the dancer and a list of their heights.
 * heights is a list of integers representing the heights of the dancer in centimeters.
 *
 * In this exercise, you need to find the dancers with heights not equal to 160 cm and create a new tuple
 * with their names. The new tuple should be sorted in alphabetical order.
 *
 * Complete the code below to solve the exercise.
 */
fun intersectionOfNotOperatorAndCreatingTuple(dancerName: String, dancerHeights: List<Pair<String, Int>>): List<String> {

    // Create an empty list to store the names of the dancers
    val dancersWithDifferentHeights = mutableListOf<String>()

    // Iterate over the elements in the dancerHeights list
    for (dancer in dancerHeights) {
        val height = dancer.second

        // Check if the height is not equal to 160 cm
        if (height != 160) {
            // Append the dancer's name to the list
            dancersWithDifferentHeights.add(dancer.first)
        }
    }

    // Sort the names alphabetically
    val sortedDancers = dancersWithDifferentHeights.sorted()

    return sortedDancers
}