<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Segment-Tree on</title><link>https://h30306.github.io/blog/zh-tw/tags/segment-tree/</link><description>Recent content in Segment-Tree on</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><managingEditor>hwork0511@gmail.com (Wei Yi Chung)</managingEditor><webMaster>hwork0511@gmail.com (Wei Yi Chung)</webMaster><copyright>© 2026 Wei Yi Chung</copyright><lastBuildDate>Wed, 21 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://h30306.github.io/blog/zh-tw/tags/segment-tree/index.xml" rel="self" type="application/rss+xml"/><item><title>Segment Tree 與 Fenwick Tree</title><link>https://h30306.github.io/blog/zh-tw/algorithm/segment-tree/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/algorithm/segment-tree/</guid><description>單點更新、區間查詢：Fenwick Tree（樹狀陣列）用 i &amp;amp; -i 跳，線段樹用遞迴把區間切兩半；兩者都是每次操作 O(log n)</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/algorithm/segment-tree/featured.png"/></item><item><title>LeetCode 307: Range Sum Query - Mutable</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-307/</link><pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-307/</guid><description>LeetCode 307 解題筆記：單點更新加區間和，前綴和每次更新要 O(n)；用線段樹或 Fenwick Tree，兩種操作都是 O(log n)</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-307/featured.png"/></item><item><title>LeetCode 3719: Longest Balanced Subarray I</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3719/</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3719/</guid><description>LeetCode 3719 解題筆記：n 只有 1500，固定左端點往右擴，用兩個集合增量維護不同的奇數和偶數</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3719/featured.png"/></item></channel></rss>