/**
 * Given a string representing a list of elements and a target list,
 * find the elements in the target list that are not present in the data list and return them in a tuple.
 *
 * @param data A string representing a list of elements separated by spaces
 * @param target A list of elements
 * @return A tuple containing the elements in the target list that are not present in the data list
 */
fun findAbsentElements(data: String, target: List<String>): List<String> {

    // Convert the string to a list of elements
    val elements = data.split(" ")

    // Remove duplicates from the target list
    val targetUnique = target.toSet()

    // Initialize an empty list to store the absent elements
    val absentElements = mutableListOf<String>()

    // Iterate over each element in the target list
    for (element in targetUnique) {
        // Check if the element is not in the data list
        if (element !in elements) {
            // Append the absent element to the list
            absentElements.add(element)
        }
    }

    return absentElements
}
/**
 * Given a string representing a list of elements and a target list,
 * find the elements in the target list that are not present in the data list and return them in a tuple.
 *
 * @param data A string representing a list of elements separated by spaces
 * @param target A list of elements
 * @return A tuple containing the elements in the target list that are not present in the data list
 */
fun findAbsentElements(data: String, target: List<String>): List<String> {
/**
 * Given a string representing a list of elements and a target list,
 * find the elements in the target list that are not present in the data list and return them in a tuple.
 *
 * @param data A string representing a list of elements separated by spaces
 * @param target A list of elements
 * @return A tuple containing the elements in the target list that are not present in the data list
 */
fun findAbsentElements(data: String, target: List<String>): List<String> {

    // Convert the string to a list of elements
    val elements = data.split(" ")

    // Remove duplicates from the target list
    val targetUnique = target.toSet()

    // Initialize an empty list to store the absent elements
    val absentElements = mutableListOf<String>()

    // Iterate over each element in the target list
    for (element in targetUnique) {
        // Check if the element is not in the data list
        if (element !in elements) {
            // Append the absent element to the list
            absentElements.add(element)
        }
    }

    return absentElements
}