The DEV Team

Base CS: Depth First Search Writing

vaidehijoshi profile image Vaidehi Joshi 惻1 min read

BaseCS Season 2 (9 Part Series)

1) BaseCS: Intro to Binary 2) BaseCS: Working with Binary 3 ... 7 3) BaseCS: The Magic Number of Computers 4) BaseCS: Making Sense of the Rainbow 5) BaseCS: Tree Traversal 6) Base CS: Depth First Search Writing 7) BaseCS: Depth First Search Implementing 8) BaseCS: Graph Theory Part 1 9) BaseCS: Graph Theory Part 2

Today's episode of BaseCS explores depth-first tree traversal on trees!

We'll learn the basics of the DFS algorithm, and see how to interact with a single node when traversing through a tree. Next, we'll investigate the different common strategies used to implement this algorithm: Preorder, Inorder, and Postorder search. Finally, we'll learn about the benefits and downsides of these different strategies and determine when to use one strategy over the other!

This whole series is sponsored by Heroku. A special thank you to Heroku for their ongoing support!

The DEV Team

The team behind this very platform. šŸ˜„


markdown guide

The way you explain things with diagrams is just amazing. I like how you break down complex concepts to simple statements. This is great starting point for people to get an idea of whatever you explain šŸ¤“
Keep up the great work Vaidehi!


where implementation link and More Problems beginners ?


Thank you again for another great explanation, Vaidehi.