/**
 * This function takes two lists A and B and returns a new list containing the common elements between them.
 */
fun subsetIntersection(A: List<Int>, B: List<Int>): List<Int> {

    // Create an empty list to store the common elements
    val commonElements = mutableListOf<Int>()

    // Iterate over each element in list A
    for (a in A) {
        // Iterate over each element in list B
        for (b in B) {
            // Check if the current element in A is equal to the current element in B
            if (a == b) {
                // Append the common element to the commonElements list
                commonElements.add(a)
                break
            }
        }
    }

    return commonElements
}
/**
 * This function takes two lists A and B and returns a new list containing the common elements between them.
 */
fun subsetIntersection(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.
 */
fun subsetIntersection(A: List<Int>, B: List<Int>): List<Int> {

    // Create an empty list to store the common elements
    val commonElements = mutableListOf<Int>()

    // Iterate over each element in list A
    for (a in A) {
        // Iterate over each element in list B
        for (b in B) {
            // Check if the current element in A is equal to the current element in B
            if (a == b) {
                // Append the common element to the commonElements list
                commonElements.add(a)
                break
            }
        }
    }

    return commonElements
}