Computer Science Fundamentals/ Data Structures and AlgorithmsLESSON 20 OF 34Log inSubscribe
DFS, BFS and Binary Tree Search lesson slide
LESSON 20 OF 34 · IN THE FULL COURSE

This one's part of the full course

Good to see you. This one's in the full course

8 lessons are free to watch right now, no account needed. If they click, grab the course and every lesson is yours to keep.

You've seen how I teach. The other 26 lessons are in the full course, and your progress comes with you.

Already bought it? Log in and it picks up right here.

Your progress comes with you the moment you buy.

Data Structures and Algorithms · LESSON 20

DFS, BFS and Binary Tree Search

Discuss
THE COURSE, END TO ENDNow playingDoneAheadYou are hereFree to watchIn the full course
Foundations
Logic and Binary
Information Theory
Crypto
CS Theory
Data Structures and Algorithms
Software Design
Core Skills
ABOUT THIS LESSON

When I interviewed at Google in 2015 I was asked a Depth-first search question. I couldn’t believe it! I actually giggled about it - but not in a condescending way - I had just read an article that stated flatly “if you interview at Google, you better know your binary tree algorithms” and boom! There it was.

The question had to do with lines of succession in a royal family tree and it was a lot of fun to work through it. Believe it or not I enjoyed it and the interviewer seemed to be happy with my answer!

Another super popular interview is question is about balancing a binary tree. You usually find these questions in the screening phase - they’re considered a little easier to deal with than the more complex questions we’ll tackle later on.

To balance a binary tree you’ll need to know how to efficiently traverse it - that’s where depth-first and it’s couterpart breadth-first search come in.

34lessons across 8 sections
8free to watch right now
Foreverbuy it once, it's yours for life

34 lessons · 9.6 hours · all done

You finished Computer Science Fundamentals.

Every lesson, start to finish. That takes some doing, and you did it. Now go build something with it.

Cheers! Rob