---
title: "Discussion on \"[LeetCode] 1524. Number of Sub-arrays With Odd Sum\" | Hashnode"
description: "Discussion on \"[LeetCode] 1524. Number of Sub-arrays With Odd Sum\". Efficiently find sub-arrays with odd sums using prefix sums. Achieve a time complexity of O(n) with constant space"
url: "https://hashnode.com/posts/leetcode-1524-number-of-sub-arrays-with-odd-sum/67bd290ece5a9ad20bff1186"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[LeetCode\] 1524. Number of Sub-arrays With Odd Sum](https://riveroverflow.hashnode.dev/leetcode-1524-number-of-sub-arrays-with-odd-sum?utm_source=hashnode&utm_medium=feed)

Efficiently find sub-arrays with odd sums using prefix sums. Achieve a time complexity of O(n) with constant space

Feb 25, 2025 · 2 min read · riveroverflow.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#prefix-sum](https://hashnode.com/tag/prefix-sum)
-   [#dynamic-programming](https://hashnode.com/tag/dynamic-programming)

## Written by

[Chaewoon kang](https://hashnode.com/@riveroverflow)

@riveroverflow · Paju-si, Korea

  
[View profile](https://hashnode.com/@riveroverflow)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
