How to Traverse Binary Trees with Queues in Javascript

Описание к видео How to Traverse Binary Trees with Queues in Javascript

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

Комментарии

Информация по комментариям в разработке