Depth-First Search and Recursion are the two most important topics for the coding interview, as they can be used to solve a wide variety of problems. This video will give you a strong foundation in both topics by teaching you how to solve Binary Tree problems using recursion.
0:00 Introduction
1:44 Depth-First Search Basics
4:24 Thinking Recursively
7:04 Visualizing a Recursive Function
10:21 Relationship between DFS and Recursion
11:07 Time and Space Complexity
11:54 Benefits of Recursion
13:12 Implementing a Recursive Function: Count Nodes in Binary Tree
15:06 Search Binary Tree for Target Implementation
17:43 Visualizing a Search Binary Tree for Target
20:02 Conclusion
After watching this video, make sure to try these two problems:
www.hellointerview.com/learn/code/depth-first-sear…
www.hellointerview.com/learn/code/depth-first-sear…
Full write-up here: www.hellointerview.com/learn/code/depth-first-sear…
Preparing for your upcoming interviews and want to practice with top FAANG interviewers? Book a mock interview at:
www.hellointerview.com/
Good luck with your upcoming interviews!
コメント