/**
 * Given two lists of elements, finds the intersection of the lists using slicing and the continue statement.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list with the common elements found in both lists.
 */
fun continueSliceIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    for (element in list1) {
        if (element !in intersection) {
            for (i in list2.indices) {
                if (element == list2[i]) {
                    continue
                }
                intersection.add(element)
            }
        }
    }

    return intersection
}
/**
 * Given two lists of elements, finds the intersection of the lists using slicing and the continue statement.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list with the common elements found in both lists.
 */
fun continueSliceIntersection(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists of elements, finds the intersection of the lists using slicing and the continue statement.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list with the common elements found in both lists.
 */
fun continueSliceIntersection(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    for (element in list1) {
        if (element !in intersection) {
            for (i in list2.indices) {
                if (element == list2[i]) {
                    continue
                }
                intersection.add(element)
            }
        }
    }

    return intersection
}