NeetCode #115LC-1524MediumArrays & Hashing
← Back to All Problems#115 · #1524 · Number of Sub-arrays With Odd Sum(和为奇数的子数组数目)
📌 Problem Statement & Constraints
Given an array of integers
arr, return the number of subarrays with an odd sum. The answer may be large, so return it modulo 10^9 + 7. Constraints: 1 <= arr.length <= 10^5, 1 <= arr[i] <= 100.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!