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

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 74

  • @praveenji1533
    @praveenji1533 2 роки тому +30

    If there wasn't UA-cam I wouldn't have found such a great teacher...
    You are the best teacher i have found ❤️

  • @unique_soul_time
    @unique_soul_time 2 роки тому +3

    The best explaination not using any fancy things like other youtubers.

  • @prashantchaudhary8147
    @prashantchaudhary8147 2 роки тому +3

    short and crisp explanation

  • @gitanjalikumari9262
    @gitanjalikumari9262 2 роки тому +5

    Just great explaination..plz make one video on recursion..how recursion actually work by using stack

  • @linguisticgamer
    @linguisticgamer 2 роки тому +2

    bhai bahut badia, bahut kam indian dekhein jinhe explain karna aata hai warna toh bas paise ke liye kuch bhi upload karte hain.

  • @laveshgarg2189
    @laveshgarg2189 2 роки тому +6

    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 роки тому +6

      Sure more videos on the way, stay tuned 😊

  • @THrishikeshJamgade
    @THrishikeshJamgade 2 роки тому +1

    Thanks for making such videos it Helps a lot . Salute from MP 😀😀😀😀

  • @thedvn3895
    @thedvn3895 Рік тому +1

    Anuj bhaiya UA-cam ki pahali comment jaati hai aapko ❤Mind blowing approach ❤ ,,

  • @sreejasree7427
    @sreejasree7427 2 місяці тому

    thanks , easiest way of explanation

  • @amansayer4943
    @amansayer4943 Рік тому

    best ever explanation for this question

  • @mayanksharma1518
    @mayanksharma1518 2 роки тому +3

    Thankyou so much Bhaiya for the efforts, studying with the help of your videos really changed my perspective towards coding.
    love you bhaiya.

  • @yashyadav7927
    @yashyadav7927 2 роки тому +1

    bhaiya yaha tak samj aaaga lets see whats ahead waiting for me buz level of question is getting hard now.

  • @supratiksarkar1195
    @supratiksarkar1195 2 роки тому +4

    dimag ka dahi ho gaya. this is so tough. i want to leave coding. but i won't.

  • @bhagyashreekhairnar683
    @bhagyashreekhairnar683 7 місяців тому

    Thanks a lot!! Precisely what i needed!

  • @linguisticgamer
    @linguisticgamer 2 роки тому +1

    Thanks!

  • @SunnyGupta00
    @SunnyGupta00 2 роки тому +1

    Bhaiya please make video on Google Hash code, how to solve questions and also please show us how to submit Answer by submitting one

  • @atuldwivedi7677
    @atuldwivedi7677 2 роки тому

    Very nice bhaiya 🔥🔥🔥 and Thanks a lot 🙏🙏

  • @SunnyGupta00
    @SunnyGupta00 2 роки тому +1

    Bhaiya please make video on Google Hash code, how to solve questions and also please show us how to submit output by submitting one

  • @Lifeofkashh31
    @Lifeofkashh31 2 роки тому +1

    helpful bhiya

  • @Reel460
    @Reel460 2 роки тому +2

    Bhaiya plz 🙏🙏 Java playlist available krva do 🙏🙏

    • @RAHULKUMAR-lb3gm
      @RAHULKUMAR-lb3gm 2 роки тому +1

      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

  • @AnkurSingh-kj9wu
    @AnkurSingh-kj9wu 2 роки тому

    better explaination than apna college

  • @petercampbell8931
    @petercampbell8931 2 роки тому

    Best explanation

  • @saritaprasad4295
    @saritaprasad4295 Рік тому

    I got the java developer job. In interview they asked medium hard level questions.

  • @anushak1446
    @anushak1446 2 роки тому

    Very helpful

  • @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......❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @fardilviews
    @fardilviews 2 роки тому

    Love from Bangladesh.

  • @BHARATKUMAR-dk1ij
    @BHARATKUMAR-dk1ij 2 роки тому +1

    nice video

  • @abhijitwaghmode
    @abhijitwaghmode 2 роки тому +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 Рік тому +1

      This solution doesn't work for n ary tree tree

  • @pathak_ji1
    @pathak_ji1 2 роки тому

    #awesome course

  • @kousiknandi8791
    @kousiknandi8791 2 роки тому +3

    HOW TO PREPARE FOR GATE ALONG WITH COLLAGE ...iske upar eak video banadijie please ..

  • @kingmaker9082
    @kingmaker9082 2 роки тому +1

    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.

  • @SunnyGupta00
    @SunnyGupta00 2 роки тому +1

    I am facing issue how to solve google hash code Question can you please solve one and make a video on it please

  • @arpitabiswal1522
    @arpitabiswal1522 2 роки тому

    Wonderful!!!

  • @shristiiverma1106
    @shristiiverma1106 2 роки тому

    Nice bhaiya

  • @piyushagarwal8458
    @piyushagarwal8458 2 роки тому +2

    LCA (6,4) should be 2, check video at 2:10. Also correct, if I am wrong.

    • @Mr.NothingYT
      @Mr.NothingYT 3 місяці тому

      a node is LCA of itself also.

    • @darshanjyoti1536
      @darshanjyoti1536 3 місяці тому

      No. It's the lowest common ancestor. Not the smallest common ancestor. So the answer is 4 only

  • @abhijeetbasfore6816
    @abhijeetbasfore6816 2 роки тому

    No one is better than you

  • @sudhanshudubey7267
    @sudhanshudubey7267 2 роки тому

    bhaiya please make video on hackathons

  • @DurgaShiva7574
    @DurgaShiva7574 2 роки тому

    best best best !

  • @ankityogi3811
    @ankityogi3811 2 роки тому

    nice

  • @arpanmaheshwari2290
    @arpanmaheshwari2290 2 роки тому

    Bhaiya is back

  • @reenayadav8468
    @reenayadav8468 2 роки тому +1

    Itna late video kyu🙂 . Atleast two video de diya karo one week me🙏

  • @k.r.s.756
    @k.r.s.756 2 роки тому +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

  • @Shubhakar97
    @Shubhakar97 2 роки тому +1

    I feel bad for not figuring a solution for such an easy problem 😢.

  • @Zero-zero-c4e
    @Zero-zero-c4e 2 роки тому +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 роки тому +3

      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 роки тому +1

      @@arishsheikh3000 by lowest it means nearest , not the minimum lowest ..

  • @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 роки тому +1

      Time Complexity is same. However, this is more space efficient . You don't need extra space here.

  • @bhanuprakashgupta4438
    @bhanuprakashgupta4438 8 місяців тому

    why not (6,4) lowest common ancestor is 2 ?

  • @ashutoshmishra1860
    @ashutoshmishra1860 2 роки тому

    What if one of two values is not present in tre

  • @kavitatiwari3532
    @kavitatiwari3532 2 роки тому +1

    Bhaiya, why do we include 6 as its own ancestor?? I can't understand that. Please explain

    • @AnujBhaiya
      @AnujBhaiya  2 роки тому +1

      By definition, Every node is also an ancestor of itself with 0 depth.

  • @avinashkumarrao9728
    @avinashkumarrao9728 Рік тому

    bauth hard

  • @anmolagrawal4132
    @anmolagrawal4132 2 роки тому +1

    First bhaiya

  • @rajshrivastava906
    @rajshrivastava906 2 роки тому

    Bhaiya or kitne video bache h iss course m?

  • @AnkitGupta-ce2if
    @AnkitGupta-ce2if 2 роки тому

    Bhaiya Or kitne lectures baaki hai

  • @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

  • @Tranding-Star
    @Tranding-Star 2 роки тому

    Hello sir i am manish kumar me to suggest Harman Singh UA-cam channel thanks

  • @good114
    @good114 Рік тому

    💕❤️❤️💕

  • @ayushpatidar76
    @ayushpatidar76 2 роки тому +1

    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😖😖🙏🙏

  • @sujoy_321
    @sujoy_321 2 роки тому +1

    1st viewer

  • @coldstone87
    @coldstone87 2 роки тому

    I did not understand this unfortunately!

  • @aurangzaibshehzad8008
    @aurangzaibshehzad8008 7 місяців тому

    maza nahi aya bro...SAD

  • @SunnyGupta00
    @SunnyGupta00 2 роки тому +1

    I am facing issue how to solve google hash code Question can you please solve one and make a video on it please