Lowest Common Ancestor of a Binary Tree | Leetcode #236 | Trees - 7

preview_player
Показать описание
Lowest Common Ancestor of a Binary Tree | Leetcode #236 | Trees #7

Problem Statement :
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.

According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).”

Check out our other popular playlists:

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.

To support us you can donate

#coding #interview #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode
Рекомендации по теме
Комментарии
Автор

We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!

Questions you might like:

Struggling in a question??

Leave in a comment and we will make a video!!!🙂🙂🙂

AlgorithmsMadeEasy
Автор

Your videos are really beneficial and the visuals made me understand the flow of program please keep continuing❤❤

sonumondal
Автор

Best explanation out there! The animation really helped. Thanks!!!

marhawk
Автор

7:47
In the recursive call of lowestCommonAncestor method parameters should be (root.left, p, q) and (root.right, p, q) in both the calls....

Otherwise, the demonstration is awesome! 😃😃

sujalsingh
Автор

Thanks for clear animation. i just subscribed.

mukulbahedia
Автор

Subscribed, one of the best explanation and also the animation was on point and helped a ton.

mehul
Автор

Omg you are so good. Thank you so much, hope your channel will grow!

sc
Автор

Amazing explanation,
Please make video on hashing.

crazyboy-gwrk