<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Binary-Indexed-Tree on</title><link>https://h30306.github.io/blog/tags/binary-indexed-tree/</link><description>Recent content in Binary-Indexed-Tree on</description><generator>Hugo -- gohugo.io</generator><language>en</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/tags/binary-indexed-tree/index.xml" rel="self" type="application/rss+xml"/><item><title>Segment Tree and Fenwick Tree</title><link>https://h30306.github.io/blog/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/algorithm/segment-tree/</guid><description>Point updates with range queries: a Fenwick tree (binary indexed tree) jumps by i &amp;amp; -i, and a segment tree recursively halves the range; both take O(log n) per operation</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 4051: Count Subarrays with Distant Sums</title><link>https://h30306.github.io/blog/leetcode/leetcode-4051/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-4051/</guid><description>LeetCode 4051 note: prefix sums, complement counting, range counting, and the k = 0 edge case</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-4051/featured.png"/></item><item><title>LeetCode 315: Count of Smaller Numbers After Self</title><link>https://h30306.github.io/blog/leetcode/leetcode-315/</link><pubDate>Sun, 18 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-315/</guid><description>LeetCode 315 note: merge sort with indices, plus a BIT solution</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-315/featured.png"/></item><item><title>LeetCode 2193: Minimum Number of Moves to Make Palindrome</title><link>https://h30306.github.io/blog/leetcode/leetcode-2193/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2193/</guid><description>LeetCode 2193 note: greedily fix the outer pair: take the last character and swap its leftmost partner to the front, costing that index; the unpaired character ends in the middle, costing its distance there</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2193/featured.png"/></item><item><title>LeetCode 327: Count of Range Sum</title><link>https://h30306.github.io/blog/leetcode/leetcode-327/</link><pubDate>Sat, 01 Aug 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-327/</guid><description>LeetCode 327 note: prefix sums plus merge sort counting with two pointers bounding a range, and a log of retyping it over a dozen times</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-327/featured.png"/></item><item><title>LeetCode 307: Range Sum Query - Mutable</title><link>https://h30306.github.io/blog/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/leetcode/leetcode-307/</guid><description>LeetCode 307 note: point updates with range sums make prefix sums O(n) per update; a segment tree or Fenwick tree makes both operations 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></channel></rss>