/**
 * Given two arrays, arr1 and arr2, return a new array containing the common elements between them.
 *
 * Example:
 * arr1 = [1, 2, 3, 4, 5]
 * arr2 = [4, 5, 6, 7, 8]
 * Output: [4, 5]
 */
fun findCommonElements(arr1: IntArray, arr2: IntArray): IntArray {

    val commonElements = mutableListOf<Int>()

    // your code here

    return commonElements.toIntArray()
}
/**
 * Given two arrays, arr1 and arr2, return a new array containing the common elements between them.
 *
 * Example:
 * arr1 = [1, 2, 3, 4, 5]
 * arr2 = [4, 5, 6, 7, 8]
 * Output: [4, 5]
 */
fun findCommonElements(arr1: IntArray, arr2: IntArray): IntArray {
/**
 * Given two arrays, arr1 and arr2, return a new array containing the common elements between them.
 *
 * Example:
 * arr1 = [1, 2, 3, 4, 5]
 * arr2 = [4, 5, 6, 7, 8]
 * Output: [4, 5]
 */
fun findCommonElements(arr1: IntArray, arr2: IntArray): IntArray {

    val commonElements = mutableListOf<Int>()

    // your code here

    return commonElements.toIntArray()
}