/**
 * Given two lists, lst1 and lst2, this function removes the elements that are common to both lists.
 *
 * @param lst1 A list of integers.
 * @param lst2 A list of integers.
 * @return A new list with the elements that are not common to both lists.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) -> [1, 2, 3, 6, 7, 8]
 */
fun removeCommonElements(lst1: MutableList<Int>, lst2: MutableList<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    for (num in lst1) {
        if (num in lst2) {
            commonElements.add(num)
        }
    }

    for (element in commonElements) {
        lst1.remove(element)
    }

    for (element in commonElements) {
        lst2.remove(element)
    }

    return lst1 + lst2
}
/**
 * Given two lists, lst1 and lst2, this function removes the elements that are common to both lists.
 *
 * @param lst1 A list of integers.
 * @param lst2 A list of integers.
 * @return A new list with the elements that are not common to both lists.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) -> [1, 2, 3, 6, 7, 8]
 */
fun removeCommonElements(lst1: MutableList<Int>, lst2: MutableList<Int>): List<Int> {
/**
 * Given two lists, lst1 and lst2, this function removes the elements that are common to both lists.
 *
 * @param lst1 A list of integers.
 * @param lst2 A list of integers.
 * @return A new list with the elements that are not common to both lists.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) -> [1, 2, 3, 6, 7, 8]
 */
fun removeCommonElements(lst1: MutableList<Int>, lst2: MutableList<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    for (num in lst1) {
        if (num in lst2) {
            commonElements.add(num)
        }
    }

    for (element in commonElements) {
        lst1.remove(element)
    }

    for (element in commonElements) {
        lst2.remove(element)
    }

    return lst1 + lst2
}