/**
 * Given two lists of integers, returns a list of all elements that are common to both lists.
 *
 * @param n The first list of integers.
 * @param m The second list of integers.
 * @return A list containing elements that are present in both lists.
 */
fun intersectionSlices(n: List<Int>, m: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (i in n.indices) {
        for (j in m.indices) {
            if (n[i] == m[j]) {
                commonElements.add(n[i])
            }
        }
    }

    return commonElements
}
/**
 * Given two lists of integers, returns a list of all elements that are common to both lists.
 *
 * @param n The first list of integers.
 * @param m The second list of integers.
 * @return A list containing elements that are present in both lists.
 */
fun intersectionSlices(n: List<Int>, m: List<Int>): List<Int> {
/**
 * Given two lists of integers, returns a list of all elements that are common to both lists.
 *
 * @param n The first list of integers.
 * @param m The second list of integers.
 * @return A list containing elements that are present in both lists.
 */
fun intersectionSlices(n: List<Int>, m: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (i in n.indices) {
        for (j in m.indices) {
            if (n[i] == m[j]) {
                commonElements.add(n[i])
            }
        }
    }

    return commonElements
}