2096. Step-By-Step Directions From a Binary Tree Node to Another | LCA | Backtracking | 2 Pointers

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 14

  • @ArhamSheikh-kl1bo
    @ArhamSheikh-kl1bo 3 หลายเดือนก่อน +3

    Explanation is always at next level 🔥

  • @Ayush37262
    @Ayush37262 3 หลายเดือนก่อน +5

    You are quite better than codestorywithMIK

  • @prathamgolwala9282
    @prathamgolwala9282 3 หลายเดือนก่อน +3

    Bhaiya Dp on trees ka crash course pls 🙏

  • @AyushSharma-tj1kp
    @AyushSharma-tj1kp 3 หลายเดือนก่อน +5

    This is giving memory exceed limit error how to fix that??

    • @jimspatel2407
      @jimspatel2407 3 หลายเดือนก่อน +1

      You need to pass the string by reference. may be you are trying to passing string without reference.

    • @rishabhranjan5162
      @rishabhranjan5162 3 หลายเดือนก่อน +1

      passing string without reference leads to making a copy of the string for every recursive call, thus leading to memory exceed limit

    • @AyushSharma-tj1kp
      @AyushSharma-tj1kp 2 หลายเดือนก่อน

      @@rishabhranjan5162 ok thanks got it

  • @tgayush1424
    @tgayush1424 3 หลายเดือนก่อน

    i have one question ,is it good to use global variables ?
    Using global variables is not a good way to write solution for a problem i guess.

  • @abhishekshukla5484
    @abhishekshukla5484 3 หลายเดือนก่อน

    If u upload explaination notes it will be fine

  • @harshlimbachiya7510
    @harshlimbachiya7510 3 หลายเดือนก่อน

    Great Thumbnails ++

  • @curlyoreki
    @curlyoreki 2 หลายเดือนก่อน

    also link the refrence problem you are using in the problem

  • @akshaanshsrivastava9817
    @akshaanshsrivastava9817 3 หลายเดือนก่อน +1

    Very Heavy Explanation..

  • @badasspandit1886
    @badasspandit1886 3 หลายเดือนก่อน

    house robber 3 kraa do
    Mnnit se hi hoon

  • @tgayush1424
    @tgayush1424 3 หลายเดือนก่อน

    No need to take j can be done with i alone -
    int i = 0, n1 = rootToStartPath.size(), n2 = rootToDestPath.size();
    int lcaLenFromRoot = 0;
    while(i