Part 1 of a 3 part series on traversing binary trees
In this video, Liz starts a brand new interview pattern where we perform a level order traversal of a binary tree using a BFS approach with a queue. In each part of this series, Liz walks through an increasingly difficult real interview problem using this pattern in Javascript.
The Challenge (Easy):
Given a binary tree, populate an array to represent its level-by-level traversal.
You should populate the values of all nodes of each level from left to right in separate sub-arrays.
Video Overview:
0:39 Binary tree traversal review
3:01 The problem
3:38 The approach
9:43 Javascript solution
22:07 Overview
Please subscribe to our channel :)
Join us next week for part 2 of this pattern where we’ll walk through a more challenging problem traversing binary trees.
Additional Resources:
* Practice hundreds of real coding challenges at [ Ссылка ]
* Check out our tiktoks @coderbyte
Ещё видео!