<?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/zh-tw/tags/queue/</link><description>Recent content in Queue 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>Tue, 20 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://h30306.github.io/blog/zh-tw/tags/queue/index.xml" rel="self" type="application/rss+xml"/><item><title>Queue 與設計題</title><link>https://h30306.github.io/blog/zh-tw/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/zh-tw/algorithm/queue-and-design/</guid><description>環狀佇列、交錯迭代器、FIFO 配對加上取消，以及設計題常用的資料結構組合</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/zh-tw/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/zh-tw/leetcode/leetcode-622/</guid><description>LeetCode 622 解題筆記：固定大小陣列加上 head 和 count，位置都對容量取模，空和滿用 count 判斷</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/zh-tw/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/zh-tw/leetcode/leetcode-1425/</guid><description>LeetCode 1425 解題筆記：dp[i] = nums[i] + max(0, 前 k 個 dp 的最大值)；前 k 個 dp 的最大值是滑動視窗最大值，用單調佇列 O(1) 取得</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/zh-tw/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/zh-tw/leetcode/leetcode-281/</guid><description>LeetCode 281 解題筆記：queue 裡放還沒用完的來源，輪流取一個，還有剩就放回尾端；可以直接推廣到 k 個</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/zh-tw/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/zh-tw/leetcode/leetcode-3835/</guid><description>LeetCode 3835 解題筆記：花費 = (最大 - 最小) × 長度，視窗變大只會變貴，所以可以滑動視窗數子陣列；視窗最大、最小值用兩個單調佇列維護</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/zh-tw/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/zh-tw/leetcode/leetcode-3829/</guid><description>LeetCode 3829 解題筆記：乘客和司機各一個 queue，取消只記在 set 裡，配對前再把隊頭已取消的乘客丟掉</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/zh-tw/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/zh-tw/leetcode/leetcode-1696/</guid><description>LeetCode 1696 解題筆記：dp[i] = nums[i] + 前 k 個 dp 的最大值；前 k 個的最大值用單調佇列維護，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/zh-tw/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/zh-tw/leetcode/leetcode-3508/</guid><description>LeetCode 3508 解題筆記：queue 管 FIFO、set 判重複、每個目的地一個遞增的時間陣列，查詢用 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/zh-tw/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/zh-tw/leetcode/leetcode-387/</guid><description>LeetCode 387 解題筆記：先計數，再從左到右找第一個次數是 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/zh-tw/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/zh-tw/leetcode/leetcode-232/</guid><description>LeetCode 232 解題筆記：兩個 stack：in 負責 push，out 空的時候才把 in 全部倒過去，均攤 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/zh-tw/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/zh-tw/leetcode/leetcode-225/</guid><description>LeetCode 225 解題筆記：一個 queue 就夠：push 之後把前面的元素全部轉到後面，新元素就到了隊首</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-225/featured.png"/></item></channel></rss>