Lowest Common Ancestor in a Binary Tree | LCA of a Binary Tree | DSA-One Course #64

  Рет қаралды 54,577

Anuj Bhaiya

Anuj Bhaiya

Күн бұрын

Пікірлер: 74
@praveenji1533
@praveenji1533 2 жыл бұрын
If there wasn't KZbin I wouldn't have found such a great teacher... You are the best teacher i have found ❤️
@unique_soul_time
@unique_soul_time 2 жыл бұрын
The best explaination not using any fancy things like other youtubers.
@gitanjalikumari9262
@gitanjalikumari9262 2 жыл бұрын
Just great explaination..plz make one video on recursion..how recursion actually work by using stack
@prashantchaudhary8147
@prashantchaudhary8147 2 жыл бұрын
short and crisp explanation
@laveshgarg2189
@laveshgarg2189 2 жыл бұрын
Bhaiya, you are just great the way you approach a problem is just amazing and mind blowing. Thanku Very much Bhaiya We Want more videoes on binary tree please bhaiya
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
Sure more videos on the way, stay tuned 😊
@sreejasree7427
@sreejasree7427 Ай бұрын
thanks , easiest way of explanation
@THrishikeshJamgade
@THrishikeshJamgade 2 жыл бұрын
Thanks for making such videos it Helps a lot . Salute from MP 😀😀😀😀
@mayanksharma1518
@mayanksharma1518 2 жыл бұрын
Thankyou so much Bhaiya for the efforts, studying with the help of your videos really changed my perspective towards coding. love you bhaiya.
@amansayer4943
@amansayer4943 Жыл бұрын
best ever explanation for this question
@linguisticgamer
@linguisticgamer 2 жыл бұрын
bhai bahut badia, bahut kam indian dekhein jinhe explain karna aata hai warna toh bas paise ke liye kuch bhi upload karte hain.
@abhijitwaghmode
@abhijitwaghmode 2 жыл бұрын
Thanks Anuj for the great solution. Can you please explain how the solution can be extended for LCA of n ary Tree?
@sanketchore657
@sanketchore657 Жыл бұрын
This solution doesn't work for n ary tree tree
@thedvn3895
@thedvn3895 Жыл бұрын
Anuj bhaiya KZbin ki pahali comment jaati hai aapko ❤Mind blowing approach ❤ ,,
@yashyadav7927
@yashyadav7927 2 жыл бұрын
bhaiya yaha tak samj aaaga lets see whats ahead waiting for me buz level of question is getting hard now.
@bhagyashreekhairnar683
@bhagyashreekhairnar683 6 ай бұрын
Thanks a lot!! Precisely what i needed!
@Lifeofkashh31
@Lifeofkashh31 2 жыл бұрын
helpful bhiya
@linguisticgamer
@linguisticgamer 2 жыл бұрын
Thanks!
@BHARATKUMAR-dk1ij
@BHARATKUMAR-dk1ij 2 жыл бұрын
nice video
@anushak1446
@anushak1446 2 жыл бұрын
Very helpful
@SunnyGupta00
@SunnyGupta00 2 жыл бұрын
Bhaiya please make video on Google Hash code, how to solve questions and also please show us how to submit Answer by submitting one
@SunnyGupta00
@SunnyGupta00 2 жыл бұрын
Bhaiya please make video on Google Hash code, how to solve questions and also please show us how to submit output by submitting one
@supratiksarkar1195
@supratiksarkar1195 2 жыл бұрын
dimag ka dahi ho gaya. this is so tough. i want to leave coding. but i won't.
@ProudIndian9999
@ProudIndian9999 9 күн бұрын
😂
@petercampbell8931
@petercampbell8931 2 жыл бұрын
Best explanation
@SunnyGupta00
@SunnyGupta00 2 жыл бұрын
I am facing issue how to solve google hash code Question can you please solve one and make a video on it please
@atuldwivedi7677
@atuldwivedi7677 2 жыл бұрын
Very nice bhaiya 🔥🔥🔥 and Thanks a lot 🙏🙏
@badnamghumakkad7087
@badnamghumakkad7087 2 жыл бұрын
Hi Anuj Bhaiya.....Please Regex series start kar do basic se advance level tak......Aaj Amazon ka Test tha 2 problems thi Regex wali nhin ho payi I am frustrated......I hope you will start it so that from next time we will be able to solve Regex problems easily........Lots of Love and hope from you...........Thankyou In advance......❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
@Reel460
@Reel460 2 жыл бұрын
Bhaiya plz 🙏🙏 Java playlist available krva do 🙏🙏
@RAHULKUMAR-lb3gm
@RAHULKUMAR-lb3gm 2 жыл бұрын
Anuj bhaiya aap Java ka course upload kigiye es channel pr... 😊
@yashsalve3976
@yashsalve3976 2 жыл бұрын
Basic java sikhya hai toh pepcoding java lvl 1 karlo...same hi hai...wo bhi java ma hi hai
@pathak_ji1
@pathak_ji1 2 жыл бұрын
#awesome course
@fardilviews
@fardilviews 2 жыл бұрын
Love from Bangladesh.
@arpitabiswal1522
@arpitabiswal1522 2 жыл бұрын
Wonderful!!!
@sudhanshudubey7267
@sudhanshudubey7267 2 жыл бұрын
bhaiya please make video on hackathons
@ankityogi3811
@ankityogi3811 2 жыл бұрын
nice
@AnkurSingh-kj9wu
@AnkurSingh-kj9wu 2 жыл бұрын
better explaination than apna college
@saritaprasad4295
@saritaprasad4295 Жыл бұрын
I got the java developer job. In interview they asked medium hard level questions.
@kingmaker9082
@kingmaker9082 2 жыл бұрын
this method assumes two values are present. if one present and other is absent . then this method doesn't works. just you have to check which value you found nd create search function for checking ther value, if you found then return lca, else return none.
@shristiiverma1106
@shristiiverma1106 2 жыл бұрын
Nice bhaiya
@DurgaShiva7574
@DurgaShiva7574 2 жыл бұрын
best best best !
@Zero-zero-c4e
@Zero-zero-c4e 2 жыл бұрын
Why we take 4 as a lowest ancesstor among 4,2,5 2 is lowest and it is common for 6 and 4 both?
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
By definition, Every node is also an ancestor of itself with 0 depth. Hence 4 is an ancestor of 4 as well as 6.
@arishsheikh3000
@arishsheikh3000 2 жыл бұрын
@@AnujBhaiya but 2 is lowest
@pritamaber
@pritamaber 2 жыл бұрын
@@arishsheikh3000 by lowest it means nearest , not the minimum lowest ..
@kousiknandi8791
@kousiknandi8791 2 жыл бұрын
HOW TO PREPARE FOR GATE ALONG WITH COLLAGE ...iske upar eak video banadijie please ..
@piyushagarwal8458
@piyushagarwal8458 2 жыл бұрын
LCA (6,4) should be 2, check video at 2:10. Also correct, if I am wrong.
@Mr.NothingYT
@Mr.NothingYT 2 ай бұрын
a node is LCA of itself also.
@darshanjyoti1536
@darshanjyoti1536 2 ай бұрын
No. It's the lowest common ancestor. Not the smallest common ancestor. So the answer is 4 only
@kavitatiwari3532
@kavitatiwari3532 2 жыл бұрын
Bhaiya, why do we include 6 as its own ancestor?? I can't understand that. Please explain
@AnujBhaiya
@AnujBhaiya 2 жыл бұрын
By definition, Every node is also an ancestor of itself with 0 depth.
@rajshrivastava906
@rajshrivastava906 2 жыл бұрын
Bhaiya or kitne video bache h iss course m?
@abhijeetbasfore6816
@abhijeetbasfore6816 2 жыл бұрын
No one is better than you
@travelspurs
@travelspurs 2 жыл бұрын
I don't get how it reduces the time complexity?? It is still O(n). Btw thanks for all the beautiful videos ❤️
@anubhabray5254
@anubhabray5254 2 жыл бұрын
Time Complexity is same. However, this is more space efficient . You don't need extra space here.
@bhanuprakashgupta4438
@bhanuprakashgupta4438 7 ай бұрын
why not (6,4) lowest common ancestor is 2 ?
@ashutoshmishra1860
@ashutoshmishra1860 2 жыл бұрын
What if one of two values is not present in tre
@arpanmaheshwari2290
@arpanmaheshwari2290 2 жыл бұрын
Bhaiya is back
@k.r.s.756
@k.r.s.756 2 жыл бұрын
Bhaiya aman bhaiya ko bol ke java wala public krwa dijiye n
@k.r.s.756
@k.r.s.756 2 жыл бұрын
Ya bhaiya 1 shot mein jldi jldi pdha do
@reenayadav8468
@reenayadav8468 2 жыл бұрын
Itna late video kyu🙂 . Atleast two video de diya karo one week me🙏
@AnkitGupta-ce2if
@AnkitGupta-ce2if 2 жыл бұрын
Bhaiya Or kitne lectures baaki hai
@avinashkumarrao9728
@avinashkumarrao9728 Жыл бұрын
bauth hard
@Aman-cn9qo
@Aman-cn9qo 2 жыл бұрын
Bhaiya i am a college student and require a part time job and i do video editing if you require a video editor please reply
@Shubhakar97
@Shubhakar97 Жыл бұрын
I feel bad for not figuring a solution for such an easy problem 😢.
@ayushpatidar76
@ayushpatidar76 2 жыл бұрын
sir mene BA graduation kara he or me abhi MBA (CORE) pursuing kr ra hu indore se .sir my dream is job in TCS and placement. how to job in TCS and IT MNC company sector. help it sir.bhot jada confuse hu life me kuch samjh nhi ara kya kru.please help sir.please😖😖🙏🙏
@good114
@good114 Жыл бұрын
💕❤️❤️💕
@Tranding-Star
@Tranding-Star 2 жыл бұрын
Hello sir i am manish kumar me to suggest Harman Singh KZbin channel thanks
@anmolagrawal4132
@anmolagrawal4132 2 жыл бұрын
First bhaiya
@coldstone87
@coldstone87 2 жыл бұрын
I did not understand this unfortunately!
@sujoy_321
@sujoy_321 2 жыл бұрын
1st viewer
@aurangzaibshehzad8008
@aurangzaibshehzad8008 6 ай бұрын
maza nahi aya bro...SAD
@SunnyGupta00
@SunnyGupta00 2 жыл бұрын
I am facing issue how to solve google hash code Question can you please solve one and make a video on it please
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,6 МЛН
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 103 МЛН
Kluster Duo #настольныеигры #boardgames #игры #games #настолки #настольные_игры
00:47
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 25 МЛН
Lowest Common Ancestor of a binary tree | Leetcode #236
17:29
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 483 М.
10.1 AVL Tree - Insertion and Rotations
43:08
Abdul Bari
Рет қаралды 1,2 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,6 МЛН