/**
 * Given two lists, remove the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 */
fun deleteCommonElements(list1: MutableList<Any>, list2: MutableList<Any>) {

    val iterator1 = list1.iterator()
    while (iterator1.hasNext()) {
        val element1 = iterator1.next()
        val iterator2 = list2.iterator()
        while (iterator2.hasNext()) {
            val element2 = iterator2.next()
            if (element1 == element2) {
                iterator1.remove()
                iterator2.remove()
            }
        }
    }
}
/**
 * Given two lists, remove the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 */
fun deleteCommonElements(list1: MutableList<Any>, list2: MutableList<Any>) {
/**
 * Given two lists, remove the common elements between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 */
fun deleteCommonElements(list1: MutableList<Any>, list2: MutableList<Any>) {

    val iterator1 = list1.iterator()
    while (iterator1.hasNext()) {
        val element1 = iterator1.next()
        val iterator2 = list2.iterator()
        while (iterator2.hasNext()) {
            val element2 = iterator2.next()
            if (element1 == element2) {
                iterator1.remove()
                iterator2.remove()
            }
        }
    }
}