/**
 * This function takes in two lists and returns the common elements
 * present in both lists using the '!=' operator and the 'break' and 'continue' statements.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list containing the common elements in list1 and list2
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    for (item1 in list1) {
        var found = false
        for (item2 in list2) {
            if (item1 != item2) {
                continue
            } else {
                found = true
                break
            }
        }
        if (found) {
            commonElements.add(item1)
        }
    }

    return commonElements
}
/**
 * This function takes in two lists and returns the common elements
 * present in both lists using the '!=' operator and the 'break' and 'continue' statements.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list containing the common elements in list1 and list2
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes in two lists and returns the common elements
 * present in both lists using the '!=' operator and the 'break' and 'continue' statements.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list containing the common elements in list1 and list2
 */
fun intersectionCheck(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    for (item1 in list1) {
        var found = false
        for (item2 in list2) {
            if (item1 != item2) {
                continue
            } else {
                found = true
                break
            }
        }
        if (found) {
            commonElements.add(item1)
        }
    }

    return commonElements
}