<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enumeration on</title><link>https://h30306.github.io/blog/tags/enumeration/</link><description>Recent content in Enumeration 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/enumeration/index.xml" rel="self" type="application/rss+xml"/><item><title>Array Scanning</title><link>https://h30306.github.io/blog/algorithm/array/</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/array/</guid><description>Adjacent comparisons and walking monotonic runs (uphill, downhill, hills and valleys), keeping prefix / suffix maximums and sums in one pass, enumerating pairs in small ranges, and breaking ties with tuple keys</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/algorithm/array/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 3548: Equal Sum Grid Partition II</title><link>https://h30306.github.io/blog/leetcode/leetcode-3548/</link><pubDate>Mon, 27 Jul 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3548/</guid><description>LeetCode 3548 note: try each horizontal cut (transpose for vertical); the difference must equal a cell on the larger side, and a one-row or one-column side can only drop an end cell, while any cell works otherwise</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3548/featured.png"/></item><item><title>LeetCode 3984: Divisible Game</title><link>https://h30306.github.io/blog/leetcode/leetcode-3984/</link><pubDate>Mon, 06 Jul 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3984/</guid><description>LeetCode 3984 note: replacing a composite k by one of its prime factors only helps (more values divisible, smaller k), so try every prime factor of the numbers plus 2, running Kadane once per candidate</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3984/featured.png"/></item><item><title>LeetCode 1878: Get Biggest Three Rhombus Sums in a Grid</title><link>https://h30306.github.io/blog/leetcode/leetcode-1878/</link><pubDate>Tue, 23 Jun 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-1878/</guid><description>LeetCode 1878 note: enumerate every top vertex and size, walk the four edges, and keep the three largest distinct sums</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1878/featured.png"/></item><item><title>LeetCode 3713: Longest Balanced Substring I</title><link>https://h30306.github.io/blog/leetcode/leetcode-3713/</link><pubDate>Mon, 22 Jun 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3713/</guid><description>LeetCode 3713 note: fix the start and extend right; &amp;ldquo;every character has the same count&amp;rdquo; means &amp;ldquo;highest count × kinds = length&amp;rdquo;, an O(1) check per step</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3713/featured.png"/></item><item><title>LeetCode 3910: Count Connected Subgraphs with Even Node Sum</title><link>https://h30306.github.io/blog/leetcode/leetcode-3910/</link><pubDate>Sun, 26 Apr 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3910/</guid><description>LeetCode 3910 note: n is tiny, so enumerate subsets with a bitmask, check the even sum first, then check that the induced subgraph is connected</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3910/featured.png"/></item><item><title>LeetCode 3833: Count Dominant Indices</title><link>https://h30306.github.io/blog/leetcode/leetcode-3833/</link><pubDate>Sun, 08 Feb 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3833/</guid><description>LeetCode 3833 note: keep a suffix sum from the right and compare nums[i] × count &amp;gt; sum on the right, with no floats and without counting itself</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3833/featured.png"/></item><item><title>LeetCode 3827: Count Monobit Integers</title><link>https://h30306.github.io/blog/leetcode/leetcode-3827/</link><pubDate>Sun, 01 Feb 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3827/</guid><description>LeetCode 3827 note: the only numbers with all-equal bits are 0 and 2^k - 1, so the count is (n + 1).bit_length()</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3827/featured.png"/></item><item><title>LeetCode 2122: Recover the Original Array</title><link>https://h30306.github.io/blog/leetcode/leetcode-2122/</link><pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2122/</guid><description>LeetCode 2122 note: the smallest number is always in lower, so enumerating its partner fixes k; after sorting, two pointers pair each smallest unmatched number with the number 2k above it</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2122/featured.png"/></item><item><title>LeetCode 3804: Number of Centered Subarrays</title><link>https://h30306.github.io/blog/leetcode/leetcode-3804/</link><pubDate>Sun, 11 Jan 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3804/</guid><description>LeetCode 3804 note: fix the left end and extend right, adding to the sum and to a set; count the subarray when the sum is in the set</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3804/featured.png"/></item><item><title>LeetCode 3799: Word Squares II</title><link>https://h30306.github.io/blog/leetcode/leetcode-3799/</link><pubDate>Sun, 04 Jan 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3799/</guid><description>LeetCode 3799 note: four nested levels pruned by corner letters; sorting the words first makes the output lexicographic</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3799/featured.png"/></item><item><title>LeetCode 2044: Count Number of Maximum Bitwise-OR Subsets</title><link>https://h30306.github.io/blog/leetcode/leetcode-2044/</link><pubDate>Tue, 29 Jul 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2044/</guid><description>LeetCode 2044 note: the maximum OR is the OR of everything; once backtracking reaches it, count the rest as 2^k</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2044/featured.png"/></item><item><title>LeetCode 2094: Finding 3-Digit Even Numbers</title><link>https://h30306.github.io/blog/leetcode/leetcode-2094/</link><pubDate>Mon, 12 May 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-2094/</guid><description>LeetCode 2094 note: enumerate the even numbers 100 to 998 instead and check that each digit needed is available; Counter subtraction keeps only positives</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2094/featured.png"/></item><item><title>LeetCode 204: Count Primes</title><link>https://h30306.github.io/blog/leetcode/leetcode-204/</link><pubDate>Fri, 11 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-204/</guid><description>LeetCode 204 note: the sieve of Eratosthenes, crossing out multiples of each prime p starting at p², with the outer loop only up to √n</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-204/featured.png"/></item></channel></rss>