/**
 * This function subtracts two arrays element-wise and returns the resulting array.
 * The elements in the second array are subtracted from the elements in the first array.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return The resulting array after subtracting corresponding elements from arr2 from arr1.
 */
fun subtractArrays(arr1: IntArray, arr2: IntArray): IntArray {

    val result = IntArray(arr1.size)
    for (i in arr1.indices) {
        result[i] = arr1[i] - arr2[i]
    }
    return result
}
/**
 * This function subtracts two arrays element-wise and returns the resulting array.
 * The elements in the second array are subtracted from the elements in the first array.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return The resulting array after subtracting corresponding elements from arr2 from arr1.
 */
fun subtractArrays(arr1: IntArray, arr2: IntArray): IntArray {
/**
 * This function subtracts two arrays element-wise and returns the resulting array.
 * The elements in the second array are subtracted from the elements in the first array.
 *
 * @param arr1 The first array.
 * @param arr2 The second array.
 * @return The resulting array after subtracting corresponding elements from arr2 from arr1.
 */
fun subtractArrays(arr1: IntArray, arr2: IntArray): IntArray {

    val result = IntArray(arr1.size)
    for (i in arr1.indices) {
        result[i] = arr1[i] - arr2[i]
    }
    return result
}