Given an array of positive integers arr, return the sum of all possible subarrays that have an odd length.
A subarray is a contiguous sequence of elements within the array.
Constraints:
arr.length
arr[i]
Given an array of positive integers arr, return the sum of all possible subarrays that have an odd length.
A subarray is a contiguous sequence of elements within the array.
Constraints:
arr.length
arr[i]