/**
 * Create a function that finds the common elements between two lists 'data1' and 'data2' using the 'not in' operator.
 *
 * The function should return a new list containing only the common elements that are not present in either 'data1' or 'data2'.
 *
 * @param data1 The first input list.
 * @param data2 The second input list.
 * @return A list of common elements not found in either 'data1' or 'data2'.
 *
 * Example:
 * findCommonElementsNotIn(listOf(1, 2, 3, 4), listOf(2, 4, 6, 8)) // [1, 3, 6, 8]
 */
fun findCommonElementsNotIn(data1: List<Int>, data2: List<Int>): List<Int> {

    val uniqueElements = mutableListOf<Int>()

    for (element in data1) {
        if (element !in data2) {
            uniqueElements.add(element)
        }
    }

    for (element in data2) {
        if (element !in data1 && element !in uniqueElements) {
            uniqueElements.add(element)
        }
    }

    return uniqueElements
}
/**
 * Create a function that finds the common elements between two lists 'data1' and 'data2' using the 'not in' operator.
 *
 * The function should return a new list containing only the common elements that are not present in either 'data1' or 'data2'.
 *
 * @param data1 The first input list.
 * @param data2 The second input list.
 * @return A list of common elements not found in either 'data1' or 'data2'.
 *
 * Example:
 * findCommonElementsNotIn(listOf(1, 2, 3, 4), listOf(2, 4, 6, 8)) // [1, 3, 6, 8]
 */
fun findCommonElementsNotIn(data1: List<Int>, data2: List<Int>): List<Int> {
/**
 * Create a function that finds the common elements between two lists 'data1' and 'data2' using the 'not in' operator.
 *
 * The function should return a new list containing only the common elements that are not present in either 'data1' or 'data2'.
 *
 * @param data1 The first input list.
 * @param data2 The second input list.
 * @return A list of common elements not found in either 'data1' or 'data2'.
 *
 * Example:
 * findCommonElementsNotIn(listOf(1, 2, 3, 4), listOf(2, 4, 6, 8)) // [1, 3, 6, 8]
 */
fun findCommonElementsNotIn(data1: List<Int>, data2: List<Int>): List<Int> {

    val uniqueElements = mutableListOf<Int>()

    for (element in data1) {
        if (element !in data2) {
            uniqueElements.add(element)
        }
    }

    for (element in data2) {
        if (element !in data1 && element !in uniqueElements) {
            uniqueElements.add(element)
        }
    }

    return uniqueElements
}