loading...
The DEV Team

BaseCS: Depth First Search Implementing

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 the logic behind implementing the depth-first algorithm!

We'll start by learning about recursion, the strategy for implementing DFS, and investigate the time complexity of the algorithm. We'll also see how to implement a single node in code and try our hand at implementing a preOrderSearch function! Finally, we'll look at the space complexity of DFS, and investigate how running this algorithm impacts the call stack.

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

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

Posted on Mar 11 by:

vaidehijoshi profile

Vaidehi Joshi

@vaidehijoshi

Writing words, writing code. Sometimes doing both at once. SeΓ±iorita engineer at DEV.

The DEV Team

The team behind this very platform. πŸ˜„

Discussion

markdown guide
 
 

thanks for such an amazing tutorial! I can feel the vibe strongly from what you are trying to give us. : ) cheers.