236. Lowest Common Ancestor of a Binary Tree | EPIC Tree Series | leetcode | DSA

  Рет қаралды 1,675

shashCode

shashCode

Күн бұрын

Пікірлер: 11
@prashantchaudhary8147
@prashantchaudhary8147 3 ай бұрын
Your way of explaining things is very smooth. Keep going.
@sandeepnaikat5598
@sandeepnaikat5598 4 ай бұрын
great work thanks , most of the topics learning from u only 😊😊😊
@nownow1025
@nownow1025 Ай бұрын
Best explanation bro saw 2-3 videos of same but yours top-notch😘
@RohitKumar-dz8dh
@RohitKumar-dz8dh 6 ай бұрын
Thanks 😊
@surajgaur4770
@surajgaur4770 6 ай бұрын
Very deep understanding and cleared recursive approach.
@ShivamMaurya-ee4zp
@ShivamMaurya-ee4zp 6 ай бұрын
Best explanation on youtube ❤
@mr.nishantawasthi4402
@mr.nishantawasthi4402 9 ай бұрын
Nice explain sir ❤
@ABsStudio-s1u
@ABsStudio-s1u 6 ай бұрын
Keep Going
@susmoy4385
@susmoy4385 9 ай бұрын
Vaiya notes update kardo .. bohot Sara lecture ka notes Nehi hain .. notes or codes ko agar update kar dete to bohot accha hota
@subratamandal2924
@subratamandal2924 6 ай бұрын
Intuition ekdam bakwas. Sirf process bol diya aur usko samjhaya kyun aur kaha se wo process aya ku6 nhi bola. Last mein code ke baqt main bhi jyada nhi samjhaya..ho sakta hai mujhe samajh nhi aata Per explanation a66a nhi laga. 4 bar dekha phir bhi nhi. Aap improve kar sakte ho Thanks
@i_do_what_i_like
@i_do_what_i_like 6 ай бұрын
Maybe this will help you. I assume you understand the definition of LCA. To find it Shashwat said LCA would be the first common node we will get when we move upwards from the bottom (bottom up). Here we traverse the tree in pre-order (a type of DFS). In pre-order we process the current node, then go towards left and then go towards right. When our pointer is on any of the target node we return the address to its parent. If we reach the end of tree without finding one of target nodes, we return null. Now when recursion will unfold itself, the parent which will have two non null values will be our answer because it will the first common node to the two target nodes.
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
L27. Lowest Common Ancestor in Binary Tree | LCA | C++ | Java
14:09
take U forward
Рет қаралды 345 М.
L28. Maximum Width of Binary Tree | C++ | Java
22:41
take U forward
Рет қаралды 290 М.
DeepSeek R1 Just Revolutionized AI Forever
21:06
Cole Medin
Рет қаралды 39 М.