<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dfs on Chinese Powered Labs</title><link>https://www.chinesepowered.com/tags/dfs/</link><description>Recent content in Dfs on Chinese Powered Labs</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 07 Oct 2020 04:23:39 +0000</lastBuildDate><atom:link href="https://www.chinesepowered.com/tags/dfs/index.xml" rel="self" type="application/rss+xml"/><item><title>Depth First Search for Graphs in JavaScript</title><link>https://www.chinesepowered.com/tutorials/depth-first-search-graph-dfs-javascript/</link><pubDate>Wed, 07 Oct 2020 04:23:39 +0000</pubDate><guid>https://www.chinesepowered.com/tutorials/depth-first-search-graph-dfs-javascript/</guid><description>&lt;h2 id="introduction-to-graph-traversal"&gt;
 Introduction to Graph Traversal
 
 &lt;a class="anchor" href="#introduction-to-graph-traversal"&gt;#&lt;/a&gt;
 
&lt;/h2&gt;
&lt;p&gt;Depth First Search (DFS) is a fundamental graph traversal algorithm that explores as far as possible along each branch before backtracking. Unlike tree traversal where we have a clear hierarchical structure with left and right children, graphs present unique challenges: they can contain cycles, have multiple paths between nodes, and lack a defined root. This makes DFS for graphs both more complex and more versatile than its tree-based counterpart.&lt;/p&gt;</description></item><item><title>Depth First Search: A Complete Guide to DFS Algorithm</title><link>https://www.chinesepowered.com/tutorials/depth-first-search/</link><pubDate>Tue, 06 Oct 2020 13:56:17 +0000</pubDate><guid>https://www.chinesepowered.com/tutorials/depth-first-search/</guid><description>&lt;h2 id="introduction-to-depth-first-search"&gt;
 Introduction to Depth First Search
 
 &lt;a class="anchor" href="#introduction-to-depth-first-search"&gt;#&lt;/a&gt;
 
&lt;/h2&gt;
&lt;p&gt;Depth-first search (DFS) is a fundamental algorithm for traversing or searching tree and graph data structures. The core principle of DFS is to explore as deeply as possible along each branch before backtracking to explore alternative paths. This &amp;ldquo;go deep first&amp;rdquo; strategy distinguishes it from breadth-first search, which explores nodes level by level.&lt;/p&gt;
&lt;p&gt;The algorithm begins at a root node (or an arbitrary starting node in the case of a graph) and systematically explores each branch to its deepest point before moving to the next branch. This exhaustive exploration pattern makes DFS particularly useful for problems involving path finding, cycle detection, topological sorting, and solving maze-like puzzles.&lt;/p&gt;</description></item></channel></rss>