DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Play Button Pause Button
Vaidehi Joshi for The DEV Team

Posted on

BaseCS: Depth First Search Implementing

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!

Latest comments (2)

Collapse
 
davidyaonz profile image
David Yao

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

Collapse
 
ben profile image
Ben Halpern

10:22 O(h) TIL ๐Ÿ˜„

๐ŸŒš Friends don't let friends browse without dark mode.

Sorry, it's true.