Part 2 of a 3 part series on traversing binary trees
In this video, Liz continues exploring the interview coding pattern where we perform a level order traversal (aka breadth-first traversal) of a binary tree using a queue.
The Challenge (Medium):
Given a binary tree, connect each node with its level-order successor. The last node of each level should point to a null node.
Video Overview:
0:28 Binary tree level order traversal
1:22 Visualization of level order traversal
2:13 The problem
3:45 The approach
9:14 Time and space complexity
10:47 Javascript solution
27:42 Overview
Please subscribe to our channel :)
Join us next week for part 3 of this pattern where we’ll walk through a more challenging problem traversing binary trees.
Additional Resources:
Practice hundreds of real coding challenges at https://coderbyte.com/
Check out our tiktoks @coderbyte
On this page of the site you can watch the video online How to Traverse Binary Trees with Queues in Javascript with a duration of hours minute second in good quality, which was uploaded by the user Coderbyte 31 October 2022, share the link with friends and acquaintances, this video has already been watched 1,438 times on youtube and it was liked by 28 viewers. Enjoy your viewing!