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

Vertical order traversal of a binary tree | Leetcode #987

This video explains how to find the vertical order traversal of a binary tree which is from Leetcode 987.This problem is slightly different from the easier version where we are just required to find vertical order traversal based on Y-axis only.In this problem, we are required to find vertical order traversal of a binary tree based on X and Y axis.We can solve it using DFS as well as BFS.I have explained in detail the DFS approach but simple DFS/Recursion won't work which i have shown using an example.I have the data structure which will be used to solve it with reason.We can use Map of Map of Set in order to maintain the constraints of the problem statement.I have explained the entire algorithm to find vertical level order traversal using example.At the end of the video, i have explained the CODE walk through.CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

========================================================================
Join this channel to get access to perks:
https://www.youtube.com/channel/UCnxhETjJtTPs37hOZ7vQ88g/join

INSTAGRAM : https://www.instagram.com/surya.pratap.k/

SUPPORT OUR WORK: https://www.patreon.com/techdose

LinkedIn: https://www.linkedin.com/in/surya-pratap-kahar-47bb01168

WEBSITE: https://techdose.co.in/

TELEGRAM Channel LINK: https://t.me/codewithTECHDOSE

TELEGRAM Group LINK: https://t.me/joinchat/SRVOIxWR4sRIVv5eEGI4aQ
=======================================================================

CODE LINK: https://gist.github.com/SuryaPratapK/d73b9a97c2c8a2af762af106b794ad2d

Видео Vertical order traversal of a binary tree | Leetcode #987 канала TECH DOSE
Показать
Комментарии отсутствуют
Введите заголовок:

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

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

Зарегистрируйтесь или войдите с
Информация о видео
10 августа 2020 г. 23:24:09
00:18:03
Яндекс.Метрика