/**
 * Given two lists of negative integers, find the common elements using the AND operator.
 *
 * @param list1 First list of negative integers
 * @param list2 Second list of negative integers
 * @return List of common negative integers found in both input lists
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    for (num1 in list1) {
        for (num2 in list2) {
            if (num1 and num2 == num1) {  // Using the AND operator to check if num1 is a common element
                commonElements.add(num1)
                break  // Break out of the inner loop once a common element is found for num1
            }
        }
    }
    return commonElements
}
/**
 * Given two lists of negative integers, find the common elements using the AND operator.
 *
 * @param list1 First list of negative integers
 * @param list2 Second list of negative integers
 * @return List of common negative integers found in both input lists
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * Given two lists of negative integers, find the common elements using the AND operator.
 *
 * @param list1 First list of negative integers
 * @param list2 Second list of negative integers
 * @return List of common negative integers found in both input lists
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()
    for (num1 in list1) {
        for (num2 in list2) {
            if (num1 and num2 == num1) {  // Using the AND operator to check if num1 is a common element
                commonElements.add(num1)
                break  // Break out of the inner loop once a common element is found for num1
            }
        }
    }
    return commonElements
}