/**
 * The function takes two lists as input and performs the following operations:
 * 1. Removes all elements from lst1 that are present in lst2.
 * 2. Concatenates the remaining elements in lst1 and lst2, ensuring no duplicates.
 * Finally, it returns the concatenated list.
 *
 * @param lst1 First list of elements
 * @param lst2 Second list of elements
 * @return Concatenated list with elements from both input lists
 */
fun removeAndConcatenate(lst1: MutableList<Any>, lst2: MutableList<Any>): List<Any> {

    // Remove elements from lst1 that are present in lst2
    for (element in lst2) {
        if (element in lst1) {
            lst1.remove(element)
        }
    }

    // Concatenate the remaining elements from lst1 and lst2 without duplicates
    val concatenatedList = lst1 + lst2

    // Remove duplicate elements from the concatenated list
    val uniqueList = concatenatedList.distinct()

    return uniqueList
}
/**
 * The function takes two lists as input and performs the following operations:
 * 1. Removes all elements from lst1 that are present in lst2.
 * 2. Concatenates the remaining elements in lst1 and lst2, ensuring no duplicates.
 * Finally, it returns the concatenated list.
 *
 * @param lst1 First list of elements
 * @param lst2 Second list of elements
 * @return Concatenated list with elements from both input lists
 */
fun removeAndConcatenate(lst1: MutableList<Any>, lst2: MutableList<Any>): List<Any> {
/**
 * The function takes two lists as input and performs the following operations:
 * 1. Removes all elements from lst1 that are present in lst2.
 * 2. Concatenates the remaining elements in lst1 and lst2, ensuring no duplicates.
 * Finally, it returns the concatenated list.
 *
 * @param lst1 First list of elements
 * @param lst2 Second list of elements
 * @return Concatenated list with elements from both input lists
 */
fun removeAndConcatenate(lst1: MutableList<Any>, lst2: MutableList<Any>): List<Any> {

    // Remove elements from lst1 that are present in lst2
    for (element in lst2) {
        if (element in lst1) {
            lst1.remove(element)
        }
    }

    // Concatenate the remaining elements from lst1 and lst2 without duplicates
    val concatenatedList = lst1 + lst2

    // Remove duplicate elements from the concatenated list
    val uniqueList = concatenatedList.distinct()

    return uniqueList
}