/**
 * A biologist wants to find the common elements between two arrays using the break statement.
 * Given two arrays arr1 and arr2, this function returns a list containing the common elements of the two arrays.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return A list of common elements between arr1 and arr2.
 *
 * Example:
 * findCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun findCommonElements(arr1: List<Int>, arr2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (i in arr1) {
        for (j in arr2) {
            if (i == j) {
                commonElements.add(i)
                break
            }
        }
    }

    return commonElements
}
/**
 * A biologist wants to find the common elements between two arrays using the break statement.
 * Given two arrays arr1 and arr2, this function returns a list containing the common elements of the two arrays.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return A list of common elements between arr1 and arr2.
 *
 * Example:
 * findCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun findCommonElements(arr1: List<Int>, arr2: List<Int>): List<Int> {
/**
 * A biologist wants to find the common elements between two arrays using the break statement.
 * Given two arrays arr1 and arr2, this function returns a list containing the common elements of the two arrays.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return A list of common elements between arr1 and arr2.
 *
 * Example:
 * findCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 */
fun findCommonElements(arr1: List<Int>, arr2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (i in arr1) {
        for (j in arr2) {
            if (i == j) {
                commonElements.add(i)
                break
            }
        }
    }

    return commonElements
}