/**
 * This function takes two lists A and B and returns a new list containing the common elements between them.
 * It uses list comprehension to solve the problem.
 */
fun subsetIntersectionComprehension(A: List<Int>, B: List<Int>): List<Int> {

    // Use list comprehension to create a new list containing the common elements
    val commonElements = A.filter { a -> B.contains(a) }

    return commonElements
}
/**
 * This function takes two lists A and B and returns a new list containing the common elements between them.
 * It uses list comprehension to solve the problem.
 */
fun subsetIntersectionComprehension(A: List<Int>, B: List<Int>): List<Int> {
/**
 * This function takes two lists A and B and returns a new list containing the common elements between them.
 * It uses list comprehension to solve the problem.
 */
fun subsetIntersectionComprehension(A: List<Int>, B: List<Int>): List<Int> {

    // Use list comprehension to create a new list containing the common elements
    val commonElements = A.filter { a -> B.contains(a) }

    return commonElements
}