<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BFS on BenzHub</title><link>https://benzhub.github.io/tags/bfs/</link><description>Recent content in BFS on BenzHub</description><generator>Hugo</generator><language>zh-TW</language><lastBuildDate>Thu, 09 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://benzhub.github.io/tags/bfs/index.xml" rel="self" type="application/rss+xml"/><item><title>BFS 與 DFS — 廣度優先與深度優先搜尋完整教學 | 資料結構與演算法</title><link>https://benzhub.github.io/post/javascript/data-structures--algorithms/026-bfs-dfs/</link><pubDate>Thu, 09 Jul 2026 00:00:00 +0000</pubDate><guid>https://benzhub.github.io/post/javascript/data-structures--algorithms/026-bfs-dfs/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;BFS（廣度優先搜尋）&lt;/strong&gt; 與 &lt;strong&gt;DFS（深度優先搜尋）&lt;/strong&gt; 是圖論中最核心的兩種遍歷策略。&lt;strong&gt;BFS&lt;/strong&gt; 如同水波向外擴散，逐層推進，天然找到無權圖的最短路徑；&lt;strong&gt;DFS&lt;/strong&gt; 如同走迷宮，沿一條路徑深入到底再回溯，自然揭示圖的拓撲結構。掌握這兩種思想，等於拿到了圖演算法的入場券。&lt;/p&gt;
&lt;/blockquote&gt;</description></item></channel></rss>