<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sieve on</title><link>https://h30306.github.io/blog/tags/sieve/</link><description>Recent content in Sieve 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>Tue, 20 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://h30306.github.io/blog/tags/sieve/index.xml" rel="self" type="application/rss+xml"/><item><title>Number Theory</title><link>https://h30306.github.io/blog/algorithm/number-theory/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/algorithm/number-theory/</guid><description>GCD, primality tests, the sieve of Eratosthenes / linear sieve / smallest prime factor (SPF), connecting numbers by prime factors with Union-Find, and splitting an array by the last occurrence of prime factors</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/algorithm/number-theory/featured.png"/></item><item><title>LeetCode 2584: Split the Array to Make Coprime Products</title><link>https://h30306.github.io/blog/leetcode/leetcode-2584/</link><pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2584/</guid><description>LeetCode 2584 note: coprime products ⇔ no prime factor in both parts; record each prime&amp;rsquo;s last index, extend reach left to right, and split after i when reach == i</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2584/featured.png"/></item><item><title>LeetCode 1998: GCD Sort of an Array</title><link>https://h30306.github.io/blog/leetcode/leetcode-1998/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-1998/</guid><description>LeetCode 1998 note: numbers in one component can be permuted freely; union each number with its prime factors via SPF, and the array sorts iff each position&amp;rsquo;s old and new values share a group</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1998/featured.png"/></item><item><title>LeetCode 2523: Closest Prime Numbers in Range</title><link>https://h30306.github.io/blog/leetcode/leetcode-2523/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2523/</guid><description>LeetCode 2523 note: sieve the primes in range, since only adjacent primes can be closest; or trial-divide rightward from left and stop at the first twin primes with gap 2</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2523/featured.png"/></item><item><title>LeetCode 2761: Prime Pairs With Target Sum</title><link>https://h30306.github.io/blog/leetcode/leetcode-2761/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2761/</guid><description>LeetCode 2761 note: sieve primes below n, then try x up to n / 2; when x and n - x are both prime, they form a pair</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2761/featured.png"/></item><item><title>LeetCode 2709: Greatest Common Divisor Traversal</title><link>https://h30306.github.io/blog/leetcode/leetcode-2709/</link><pubDate>Thu, 07 Aug 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2709/</guid><description>LeetCode 2709 note: every pair of indices connects ⇔ one component; factor with SPF and union each number with its prime factors in Union-Find, treating 1 specially</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2709/featured.png"/></item><item><title>LeetCode 3618: Split Array by Prime Indices</title><link>https://h30306.github.io/blog/leetcode/leetcode-3618/</link><pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3618/</guid><description>LeetCode 3618 note: primality is about the index; a sieve of Eratosthenes marks all of 0..n-1 at once, faster than trial division per index</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3618/featured.png"/></item></channel></rss>