<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Queue on</title><link>https://h30306.github.io/blog/tags/queue/</link><description>Recent content in Queue 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/queue/index.xml" rel="self" type="application/rss+xml"/><item><title>Queue and Design Problems</title><link>https://h30306.github.io/blog/algorithm/queue-and-design/</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/queue-and-design/</guid><description>Circular queues, zigzag iterators, FIFO matching with cancellation, and the data structure combinations that design problems keep using</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/algorithm/queue-and-design/featured.png"/></item><item><title>LeetCode 622: Design Circular Queue</title><link>https://h30306.github.io/blog/leetcode/leetcode-622/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-622/</guid><description>LeetCode 622 note: a fixed array plus head and count, every position taken modulo the capacity, and count deciding empty versus full</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-622/featured.png"/></item><item><title>LeetCode 1425: Constrained Subsequence Sum</title><link>https://h30306.github.io/blog/leetcode/leetcode-1425/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-1425/</guid><description>LeetCode 1425 note: dp[i] = nums[i] + max(0, max of the previous k dp values); that max is a sliding window maximum, available in O(1) from a monotonic deque</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1425/featured.png"/></item><item><title>LeetCode 281: Zigzag Iterator</title><link>https://h30306.github.io/blog/leetcode/leetcode-281/</link><pubDate>Wed, 29 Apr 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-281/</guid><description>LeetCode 281 note: a queue of unfinished sources, take one value in turn and put the source back if anything remains; it generalizes to k sources</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-281/featured.png"/></item><item><title>LeetCode 3835: Count Subarrays With Cost Less Than or Equal to K</title><link>https://h30306.github.io/blog/leetcode/leetcode-3835/</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-3835/</guid><description>LeetCode 3835 note: cost = (max - min) × length only grows as the window grows, so a sliding window counts subarrays; two monotonic deques keep the window&amp;rsquo;s max and min</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3835/featured.png"/></item><item><title>LeetCode 3829: Design Ride Sharing System</title><link>https://h30306.github.io/blog/leetcode/leetcode-3829/</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-3829/</guid><description>LeetCode 3829 note: one queue each for riders and drivers; cancellations only update a set, and canceled riders at the front are dropped before matching</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3829/featured.png"/></item><item><title>LeetCode 1696: Jump Game VI</title><link>https://h30306.github.io/blog/leetcode/leetcode-1696/</link><pubDate>Sun, 10 Aug 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-1696/</guid><description>LeetCode 1696 note: dp[i] = nums[i] + max of the previous k dp values, with that max kept by a monotonic deque in O(n)</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1696/featured.png"/></item><item><title>LeetCode 3508: Implement Router</title><link>https://h30306.github.io/blog/leetcode/leetcode-3508/</link><pubDate>Sun, 06 Apr 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-3508/</guid><description>LeetCode 3508 note: a queue for FIFO, a set for duplicates, and an increasing time list per destination queried with bisect</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3508/featured.png"/></item><item><title>LeetCode 387: First Unique Character in a String</title><link>https://h30306.github.io/blog/leetcode/leetcode-387/</link><pubDate>Tue, 23 Aug 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-387/</guid><description>LeetCode 387 note: count first, then scan left to right for the first character with count 1</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-387/featured.png"/></item><item><title>LeetCode 232: Implement Queue using Stacks</title><link>https://h30306.github.io/blog/leetcode/leetcode-232/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-232/</guid><description>LeetCode 232 note: two stacks, where in receives pushes and out is refilled from in only when empty, amortized O(1)</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-232/featured.png"/></item><item><title>LeetCode 225: Implement Stack using Queues</title><link>https://h30306.github.io/blog/leetcode/leetcode-225/</link><pubDate>Sun, 21 Aug 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/leetcode/leetcode-225/</guid><description>LeetCode 225 note: one queue suffices: after a push, rotate all earlier elements to the back so the new element sits at the front</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-225/featured.png"/></item></channel></rss>