<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Prefix Sum on wid's blog</title><link>https://wid-blog.github.io/en/tags/prefix-sum/</link><description>Recent content in Prefix Sum on wid's blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 14 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://wid-blog.github.io/en/tags/prefix-sum/index.xml" rel="self" type="application/rss+xml"/><item><title>Sliding Window and Prefix Sum — When Monotonicity Decides</title><link>https://wid-blog.github.io/en/posts/tech/algorithm/sliding-window-and-prefix-sum/</link><pubDate>Sun, 14 Jun 2026 00:00:00 +0000</pubDate><guid>https://wid-blog.github.io/en/posts/tech/algorithm/sliding-window-and-prefix-sum/</guid><description>Subarray-sum problems collapse from O(N²) to O(N) along two paths — sliding window or prefix sum with a hash. Negative inputs or strict-equality conditions break monotonicity and shift the work from sliding window to prefix sum.</description></item></channel></rss>