/**
 * This function removes duplicate elements from a given list and returns a pair
 * containing unique elements and removed elements in the same order.
 */
fun removeDuplicates(lst: List<Int>): Pair<List<Int>, List<Int>> {

    val uniqueElements = mutableListOf<Int>()
    val removedElements = mutableListOf<Int>()

    for (element in lst) {
        if (element !in uniqueElements) {
            uniqueElements.add(element)
        } else {
            removedElements.add(element)
        }
    }

    return Pair(uniqueElements, removedElements)
}
/**
 * This function removes duplicate elements from a given list and returns a pair
 * containing unique elements and removed elements in the same order.
 */
fun removeDuplicates(lst: List<Int>): Pair<List<Int>, List<Int>> {
/**
 * This function removes duplicate elements from a given list and returns a pair
 * containing unique elements and removed elements in the same order.
 */
fun removeDuplicates(lst: List<Int>): Pair<List<Int>, List<Int>> {

    val uniqueElements = mutableListOf<Int>()
    val removedElements = mutableListOf<Int>()

    for (element in lst) {
        if (element !in uniqueElements) {
            uniqueElements.add(element)
        } else {
            removedElements.add(element)
        }
    }

    return Pair(uniqueElements, removedElements)
}