1524. Number of Sub-arrays With Odd Sum
https://leetcode.com/problems/number-of-sub-arrays-with-odd-sum
Description
Given an array of integers arr
, return the number of subarrays with an odd sum.
Since the answer can be very large, return it modulo 109 + 7
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= arr.length <= 105
1 <= arr[i] <= 100
ac
Last updated