Depth First & Tree Traversals (Pre, In, Post) Explained
Coderbyte Coderbyte
26.4K subscribers
28,026 views
795

 Published On Oct 8, 2020

In this video, we provide a walkthrough depth-first traversals of trees both iteratively and recursively and explore the differences across pre-order, in-order, and post-order traversals.

Highlights:
0:15 Learning Objectives
0:30 Depth-first traversal conceptual overview
5:30 Implementing depth-first traversal using a stack
9:58 Time and space complexity
10:50 Recursive implementation of depth-first traversal
15:31 Pre-order traversals
17:30 Post-order traversals
18:24 In-order traversals
20:12 Problem: summing a tree
28:14 Recap

Check out our video series on Data Structures & Algorithm fundamentals where we cover Big O, recursion & more: http://bit.ly/algorithm-fundamentals-...

To access hundreds of real coding challenges on algorithms, React, SQL, and more along with nearly one million solutions, visit https://coderbyte.com/.

Participate in our weekly coding challenge series at http://bit.ly/weekly-coding-challenges

Stay up to date with interview prep tips and hiring trends at   / coderbyte  

show more

Share/Embed