The post explains Depth First Search (DFS) and Breadth First Search (BFS) algorithms, including code examples for tree traversal. DFS explores as deep as possible along a branch before backtracking, while BFS examines nodes level by level using a queue. The importance of base cases in recursion for DFS is highlighted to avoid stack overflow errors. BFS examples demonstrate level order traversal and grouping of nodes.

6m read timeFrom tigerabrodi.blog
Post cover image
Table of contents
Permalink IntroductionPermalink DFSPermalink BFS

Sort: