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
Nesta página do site você pode assistir ao vídeo on-line How to Traverse Binary Trees with Queues in Javascript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Coderbyte 31 Outubro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,438 vezes e gostou 28 espectadores. Boa visualização!