/**
 * Write a function that takes in two lists and returns a new list containing only the common elements using slicing.
 *
 * @param data1 a list of elements
 * @param data2 a list of elements
 * @return A list containing the common elements in both data1 and data2
 *
 * Example:
 * - Input: data1 = [1, 2, 3, 4, 5], data2 = [4, 5, 6, 7, 8]
 *   Output: [4, 5]
 */
fun intersectionSlicingAdvantages(data1: List<Int>, data2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    
    // Your code here to find the intersection using slicing
    
    return commonElements
}
/**
 * Write a function that takes in two lists and returns a new list containing only the common elements using slicing.
 *
 * @param data1 a list of elements
 * @param data2 a list of elements
 * @return A list containing the common elements in both data1 and data2
 *
 * Example:
 * - Input: data1 = [1, 2, 3, 4, 5], data2 = [4, 5, 6, 7, 8]
 *   Output: [4, 5]
 */
fun intersectionSlicingAdvantages(data1: List<Int>, data2: List<Int>): List<Int> {
/**
 * Write a function that takes in two lists and returns a new list containing only the common elements using slicing.
 *
 * @param data1 a list of elements
 * @param data2 a list of elements
 * @return A list containing the common elements in both data1 and data2
 *
 * Example:
 * - Input: data1 = [1, 2, 3, 4, 5], data2 = [4, 5, 6, 7, 8]
 *   Output: [4, 5]
 */
fun intersectionSlicingAdvantages(data1: List<Int>, data2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    
    // Your code here to find the intersection using slicing
    
    return commonElements
}