/**
 * Given a nested list, this function finds all the elements that are not equal to the given condition.
 *
 * @param data A nested list containing different elements.
 * @param condition A value to check against the elements in the nested list.
 * @return A list of elements from the nested list that are not equal to the given condition.
 *
 * Example:
 * val data = listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 8))
 * findNonEqualElements(data, 8) // [1, 2, 3, 4, 5, 6, 7]
 */
fun findNonEqualElements(data: List<List<Int>>, condition: Int): List<Int> {

    val nonEqualElements = mutableListOf<Int>()
    for (sublist in data) {
        for (element in sublist) {
            if (element != condition) {
                nonEqualElements.add(element)
            }
        }
    }
    return nonEqualElements
}
/**
 * Given a nested list, this function finds all the elements that are not equal to the given condition.
 *
 * @param data A nested list containing different elements.
 * @param condition A value to check against the elements in the nested list.
 * @return A list of elements from the nested list that are not equal to the given condition.
 *
 * Example:
 * val data = listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 8))
 * findNonEqualElements(data, 8) // [1, 2, 3, 4, 5, 6, 7]
 */
fun findNonEqualElements(data: List<List<Int>>, condition: Int): List<Int> {
/**
 * Given a nested list, this function finds all the elements that are not equal to the given condition.
 *
 * @param data A nested list containing different elements.
 * @param condition A value to check against the elements in the nested list.
 * @return A list of elements from the nested list that are not equal to the given condition.
 *
 * Example:
 * val data = listOf(listOf(1, 2, 3), listOf(4, 5, 6), listOf(7, 8, 8))
 * findNonEqualElements(data, 8) // [1, 2, 3, 4, 5, 6, 7]
 */
fun findNonEqualElements(data: List<List<Int>>, condition: Int): List<Int> {

    val nonEqualElements = mutableListOf<Int>()
    for (sublist in data) {
        for (element in sublist) {
            if (element != condition) {
                nonEqualElements.add(element)
            }
        }
    }
    return nonEqualElements
}