<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Breadth-First-Search on</title><link>https://h30306.github.io/blog/zh-tw/tags/breadth-first-search/</link><description>Recent content in Breadth-First-Search 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>Sun, 01 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://h30306.github.io/blog/zh-tw/tags/breadth-first-search/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode 2385: Amount of Time for Binary Tree to Be Infected</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2385/</link><pubDate>Sun, 01 Nov 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2385/</guid><description>LeetCode 2385 解題筆記：把樹轉成無向圖，從 start 做 BFS，層數減一就是分鐘數</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2385/featured.png"/></item><item><title>LeetCode 2858: Minimum Edge Reversals So Every Node Is Reachable</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2858/</link><pubDate>Sat, 31 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2858/</guid><description>LeetCode 2858 解題筆記：換根 DP：先算以 0 為根要翻幾條邊，根移到小孩時，這條邊原本順向就 +1、逆向就 -1</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2858/featured.png"/></item><item><title>LeetCode 863: All Nodes Distance K in Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-863/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-863/</guid><description>LeetCode 863 解題筆記：先把樹轉成無向圖（補上往父節點的邊），再從 target BFS 走 k 步</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-863/featured.png"/></item><item><title>LeetCode 297: Serialize and Deserialize Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-297/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-297/</guid><description>LeetCode 297 解題筆記：前序遍歷加上空節點標記就能唯一還原樹；反序列化用迭代器依序取值</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-297/featured.png"/></item><item><title>LeetCode 449: Serialize and Deserialize BST</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-449/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-449/</guid><description>LeetCode 449 解題筆記：BST 只要存前序，不用空節點標記；反序列化帶著上下界遞迴，O(n)</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-449/featured.png"/></item><item><title>LeetCode 429: N-ary Tree Level Order Traversal</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-429/</link><pubDate>Sat, 24 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-429/</guid><description>LeetCode 429 解題筆記：BFS 層序遍歷，把左右小孩換成 children 清單</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-429/featured.png"/></item><item><title>LeetCode 515: Find Largest Value in Each Tree Row</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-515/</link><pubDate>Sat, 24 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-515/</guid><description>LeetCode 515 解題筆記：BFS 層序遍歷，每層取最大值；初始值用 -inf</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-515/featured.png"/></item><item><title>LeetCode 314: Binary Tree Vertical Order Traversal</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-314/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-314/</guid><description>LeetCode 314 解題筆記：BFS 帶著欄位編號，用 BFS 才能保證同一欄由上到下、同一列由左到右</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-314/featured.png"/></item><item><title>LeetCode 3787: Find Diameter Endpoints of a Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3787/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3787/</guid><description>LeetCode 3787 解題筆記：兩次 BFS 找到一條直徑的兩端 A、B；任一點最遠的點一定是 A 或 B，所以 max(dist(A,i), dist(B,i)) 等於直徑的點就是某條直徑的端點</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3787/featured.png"/></item><item><title>LeetCode 773: Sliding Puzzle</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-773/</link><pubDate>Mon, 07 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-773/</guid><description>LeetCode 773 解題筆記：盤面只有 6! = 720 種，把盤面攤平成字串當 BFS 的狀態，0 跟相鄰格交換就是下一個狀態</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-773/featured.png"/></item><item><title>LeetCode 4041: Minimum Operations to Form Subset Sum II</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-4041/</link><pubDate>Sun, 30 Aug 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-4041/</guid><description>LeetCode 4041 解題筆記：乘除可以任意順序，用 BFS 找每個數能變成的所有值（不超過 sum）和最少步數，再做跟 4040 一樣的分組 0/1 背包</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-4041/featured.png"/></item><item><title>LeetCode 488: Zuma Game</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-488/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-488/</guid><description>LeetCode 488 解題筆記：board 最多 16 顆、hand 最多 5 顆，把 (board, hand) 整個當狀態做 DFS + 記憶化；只在「同色球前面」和「拆開兩顆同色球」兩種位置插入</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-488/featured.png"/></item><item><title>LeetCode 103: Binary Tree Zigzag Level Order Traversal</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-103/</link><pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-103/</guid><description>LeetCode 103 解題筆記：一般的層序遍歷，奇數層的結果反轉就是之字形</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-103/featured.png"/></item><item><title>LeetCode 107: Binary Tree Level Order Traversal II</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-107/</link><pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-107/</guid><description>LeetCode 107 解題筆記：一般的層序遍歷，最後把結果反轉，就是由下往上</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-107/featured.png"/></item><item><title>LeetCode 116: Populating Next Right Pointers in Each Node</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-116/</link><pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-116/</guid><description>LeetCode 116 解題筆記：完美二元樹，用上一層已經接好的 next 走過這一層：left.next = right，right.next = next.left；O(1) 額外空間</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-116/featured.png"/></item><item><title>LeetCode 117: Populating Next Right Pointers in Each Node II</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-117/</link><pubDate>Fri, 18 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-117/</guid><description>LeetCode 117 解題筆記：BFS 一層一層接 next；不是完全二元樹時，只看隔壁節點的小孩會斷掉</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-117/featured.png"/></item><item><title>LeetCode 1379: Find a Corresponding Node of a Binary Tree in a Clone of That Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1379/</link><pubDate>Thu, 17 Nov 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1379/</guid><description>LeetCode 1379 解題筆記：兩棵樹同時走，原樹走到 target 時，複製樹上的同一個位置就是答案；比的是節點本身</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1379/featured.png"/></item><item><title>LeetCode 133: Clone Graph</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-133/</link><pubDate>Sun, 30 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-133/</guid><description>LeetCode 133 解題筆記：DFS 時用雜湊表記住舊節點對應的新節點，遇到已經複製過的就直接回傳，避免無限遞迴；空圖回傳 None</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-133/featured.png"/></item><item><title>LeetCode 417: Pacific Atlantic Water Flow</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-417/</link><pubDate>Sun, 30 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-417/</guid><description>LeetCode 417 解題筆記：反過來從海邊往內走，只能走到不比自己低的格子；兩個海都走得到的格子就是答案</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-417/featured.png"/></item><item><title>LeetCode 695: Max Area of Island</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-695/</link><pubDate>Sun, 30 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-695/</guid><description>LeetCode 695 解題筆記：每遇到一個沒走過的 1 就 DFS 整座島，數格子數，取最大值；格子是整數 1，不是字串</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-695/featured.png"/></item><item><title>LeetCode 102: Binary Tree Level Order Traversal</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-102/</link><pubDate>Sat, 29 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-102/</guid><description>LeetCode 102 解題筆記：BFS 一次處理一整層，用目前這層的節點產生下一層；空樹回傳空 list</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-102/featured.png"/></item><item><title>LeetCode 1448: Count Good Nodes in Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1448/</link><pubDate>Sat, 29 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1448/</guid><description>LeetCode 1448 解題筆記：DFS 往下傳路徑上的最大值，節點的值大於等於它就是好節點</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1448/featured.png"/></item><item><title>LeetCode 199: Binary Tree Right Side View</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-199/</link><pubDate>Sat, 29 Oct 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-199/</guid><description>LeetCode 199 解題筆記：層序遍歷，每一層最右邊的節點就是從右邊看得到的</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-199/featured.png"/></item><item><title>LeetCode 965: Univalued Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-965/</link><pubDate>Mon, 26 Sep 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-965/</guid><description>LeetCode 965 解題筆記：每個節點的值都要等於根的值；遞迴時比的是值，不是遞迴回傳的布林值</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-965/featured.png"/></item><item><title>LeetCode 993: Cousins in Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-993/</link><pubDate>Mon, 26 Sep 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-993/</guid><description>LeetCode 993 解題筆記：堂兄弟要同一層、但父節點不同；DFS 記錄 x 和 y 的深度與父節點再比較</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-993/featured.png"/></item><item><title>LeetCode 783: Minimum Distance Between BST Nodes</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-783/</link><pubDate>Tue, 06 Sep 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-783/</guid><description>LeetCode 783 解題筆記：BST 的中序是由小到大，最小差一定出現在中序相鄰的兩個值之間；記住前一個值逐一比較</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-783/featured.png"/></item><item><title>LeetCode 733: Flood Fill</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-733/</link><pubDate>Sat, 03 Sep 2022 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-733/</guid><description>LeetCode 733 解題筆記：從起點 DFS / BFS，四個方向上跟起點原本顏色相同的格子都換成新顏色；新舊顏色相同時直接回傳</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-733/featured.png"/></item><item><title>LeetCode 637: Average of Levels in Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-637/</link><pubDate>Mon, 29 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-637/</guid><description>LeetCode 637 解題筆記：層序遍歷，每層加總除以節點數</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-637/featured.png"/></item><item><title>LeetCode 559: Maximum Depth of N-ary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-559/</link><pubDate>Sat, 27 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-559/</guid><description>LeetCode 559 解題筆記：深度等於 1 加上所有小孩深度的最大值；沒有小孩時是 1</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-559/featured.png"/></item><item><title>LeetCode 530: Minimum Absolute Difference in BST</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-530/</link><pubDate>Thu, 25 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-530/</guid><description>LeetCode 530 解題筆記：BST 的中序是由小到大，最小差一定出現在中序相鄰的兩個值之間；記住前一個值逐一比較</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-530/featured.png"/></item><item><title>LeetCode 463: Island Perimeter</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-463/</link><pubDate>Wed, 24 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-463/</guid><description>LeetCode 463 解題筆記：每格陸地貢獻 4 條邊，每跟上方或左方的陸地相鄰一次就少 2 條</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-463/featured.png"/></item><item><title>LeetCode 404: Sum of Left Leaves</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-404/</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-404/</guid><description>LeetCode 404 解題筆記：DFS 時告訴小孩自己是不是左小孩，只有「是左小孩而且是葉子」才加</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-404/featured.png"/></item><item><title>LeetCode 226: Invert Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-226/</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-226/</guid><description>LeetCode 226 解題筆記：每個節點交換左右小孩；用同時指定，避免先改掉的那邊被拿來用</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-226/featured.png"/></item><item><title>LeetCode 111: Minimum Depth of Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-111/</link><pubDate>Tue, 16 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-111/</guid><description>LeetCode 111 解題筆記：最小深度要到葉子才算；只有一邊有小孩時不能拿空的那邊（深度 0）當最小值</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-111/featured.png"/></item><item><title>LeetCode 112: Path Sum</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-112/</link><pubDate>Tue, 16 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-112/</guid><description>LeetCode 112 解題筆記：往下走時把 targetSum 減掉目前的值，到葉子時剛好是 0（或等於葉子的值）就成立</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-112/featured.png"/></item><item><title>LeetCode 100: Same Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-100/</link><pubDate>Tue, 02 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-100/</guid><description>LeetCode 100 解題筆記：兩邊都是空的才相同；一邊空一邊不空就不同；都不空時比值再遞迴比左右</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-100/featured.png"/></item><item><title>LeetCode 101: Symmetric Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-101/</link><pubDate>Tue, 02 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-101/</guid><description>LeetCode 101 解題筆記：左子樹跟右子樹互為鏡像：外側跟外側比、內側跟內側比；比的是值，不是節點本身</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-101/featured.png"/></item><item><title>LeetCode 104: Maximum Depth of Binary Tree</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-104/</link><pubDate>Tue, 02 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-104/</guid><description>LeetCode 104 解題筆記：深度等於 1 加上左右子樹深度的較大值；空樹是 0</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-104/featured.png"/></item></channel></rss>