Загрузка страницы

Level Order Traversal

Problem:
Find Level Order Traversal of a Binary Tree.

Solution:
The solution uses a queue.
1: Add root to the queue.
2: Till the queue is not empty, repeat the following steps:
a: Get a node from the queue and print it
b: If the node has a left child, add the left child to the queue.
c: If the node has a right child, add the right child to the queue.

Code: http://www.ideserve.co.in/learn/binary-tree-level-order-traversal

Website: http://www.ideserve.co.in

Facebook: https://www.facebook.com/IDeserve.co.in

Видео Level Order Traversal канала IDeserve
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
1 августа 2015 г. 0:00:24
00:03:53
Яндекс.Метрика