Tilt of a Binary Tree - Solution | Binary Trees | Data Structure and Algorithms in JAVA

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
    NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the solution for the problem, tilt of a binary tree using recursion and minimum time and space complexity. For a better understanding of the problem, click here:
    For a better experience and more exercises, VISIT: www.pepcoding....
    #pepcoding #java #programming
    Have a look at our result: www.pepcoding....
    Follow us on our FB page: / pepcoding
    Follow us on Instagram: / pepcoding
    Follow us on LinkedIn: / pepcoding-education

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

  • @ayushgoel9584
    @ayushgoel9584 4 ปีที่แล้ว +22

    Sir all these memes and short clips are cool and keep us engaging, but due to this now we are getting just 2-3 videos/day

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +26

      hanji, shauk chadha tha. poora kar lia. kal se normal video he aaengi. ye sab minimal hoga.

    • @rahuls8613
      @rahuls8613 2 ปีที่แล้ว

      @@Pepcoding sir bich mei padtei padtei kabi bore ho jate hai fir achanak sei app koi majak ker dete ho ya koi meme aa jata hai jiskei vapas fresh feel hota hai.
      sir you are the best.

    • @kartikkathuria7506
      @kartikkathuria7506 ปีที่แล้ว

      @@Pepcoding Shauk badi chij hain

  • @AbhishekYadav-ks2mg
    @AbhishekYadav-ks2mg ปีที่แล้ว

    u are great guru jii

  • @procrastinator0811
    @procrastinator0811 2 ปีที่แล้ว +2

    editing ki wajah se content me aur jyada jaan aajata hai...amazing . Sumeet sir's explanation is wonderful.

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว +1

      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

    • @rv0_0
      @rv0_0 ปีที่แล้ว

      @@Pepcoding Website not working

  • @navneetkushwaha1830
    @navneetkushwaha1830 2 ปีที่แล้ว

    this is very interesting video and I learnt from it tilt.

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Glad to hear that!
      visit on nados.pepcoding.com you will find better experience with organised content.
      Don't forget to follow us on Instagram instagram.com/pepcoding/

  • @dipuprasad9196
    @dipuprasad9196 3 ปีที่แล้ว

    Thank you sir

  • @momentumbees3433
    @momentumbees3433 2 ปีที่แล้ว +1

    I am now not sure if i understood it. We are calculating tilt for what?
    we are not using it anywhere

  • @ayushjain5360
    @ayushjain5360 4 ปีที่แล้ว +5

    Hi sir, which method is better maintaining pair like in diameter of tree or the method you taught in this video

  • @Aakarsh_Sharma
    @Aakarsh_Sharma 2 ปีที่แล้ว +1

    Sir i have a question the final answer of this problem will be sum of all the nodes but we want it to return final tilt as answer?

  • @shang_chi4651
    @shang_chi4651 3 ปีที่แล้ว +2

    Sir ye memes waala mast lagta hai. Ek aadhe videos mein daalte raha kariye please🙏

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +1

      Sure and Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @sourabhsharma9070
    @sourabhsharma9070 4 ปีที่แล้ว +1

    please make next video on diameter of tree by the approach used in this question.

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +3

      binary tree ka playlist check kijie, wo dali hui hai

  • @kartikkathuria7506
    @kartikkathuria7506 ปีที่แล้ว

    Bhaiya padhate tym meme ni daalte poora systum hil jaata hai

  • @trading.helper-1997
    @trading.helper-1997 4 ปีที่แล้ว +2

    Bhai apka knowledge to Kamaal ka hai bhai 😂😂😂

  • @ritikshrivastava9442
    @ritikshrivastava9442 3 ปีที่แล้ว +3

    pair approach would be better because the variable which we need to use in the function are declare inside the function
    not like traveral and change strategy in which we need to declare var in the global scope

  • @Vishal-joshi1998
    @Vishal-joshi1998 2 ปีที่แล้ว

    op explanation.

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      visit nados.pepcoding.com; post your doubts there, community will help you out.

  • @RitikKumar-cx5wf
    @RitikKumar-cx5wf 3 ปีที่แล้ว +1

    Sir can you make a video on binary threaded tree with recursion solution

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Hanji beta, ek bari jo agenda main questions h vo complete kr le, then ye sb cheeze bhi cover kr lenge

  • @fanigo138
    @fanigo138 3 ปีที่แล้ว

    sir travel and change agar diameter ke liye use karenge toh o(n^2) jayega i think. pair waali method sabse achhi hai

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.

    • @SandeepSharma-co5tl
      @SandeepSharma-co5tl 3 ปีที่แล้ว

      Pair wale se solve kia?

  • @dheerajchhatani7610
    @dheerajchhatani7610 3 ปีที่แล้ว

    great!

  • @ashishjoshi8800
    @ashishjoshi8800 4 ปีที่แล้ว +2

    Sir trees ke liye aapne jo playlist bana rakhi hai wahan shuru karu na?

  • @dark_techyy
    @dark_techyy 3 ปีที่แล้ว +2

    At 4:00 i felt babu bhaiya😂😂😂😂😂😍

  • @ayushgoel9584
    @ayushgoel9584 4 ปีที่แล้ว +1

    Sir ab thode questions pair class technique se bhi Kara dijiye, taki usme bhi hath set ho jaaye

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      5 minute mei aa rha hai.

    • @jonusbrothers2067
      @jonusbrothers2067 4 ปีที่แล้ว

      @@Pepcoding Sir, which question..? unable to find..:(

    • @jonusbrothers2067
      @jonusbrothers2067 4 ปีที่แล้ว

      Is a tree Binary Search Tree ...?? this one sir?

  • @code7434
    @code7434 4 ปีที่แล้ว +2

    sir ab toh DP ke hard que daaldo please , stock waale ,and bilkul alag type ke jo usualy miss kr dete hai log

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +2

      han beta, ye 2 din memes wala explore karne mei lag gae. Aj se DP dobara.

  • @entertainshala
    @entertainshala 4 ปีที่แล้ว +1

    Sir why did you write tilt+= ltilt at 6:30 . Y are we adding tilt..we should update it with new value🤔..and also is it the total video about trees..coz u have noe yet explained trees concept in the below videos.. could you plz hlp sir..and also we are returning ts..so where is the use of tilt in that problem? Should I see the data structures which are taught before recursion topics for this?

    • @ansh4sure841
      @ansh4sure841 3 ปีที่แล้ว

      0:20 - 0:23 you have your answer

  • @nupurjoshi7643
    @nupurjoshi7643 3 ปีที่แล้ว

    sir, can we use diameter tree approach here i.e creating a class of data and tilt?

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +1

      Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.

    • @sairajdas6692
      @sairajdas6692 3 ปีที่แล้ว

      i think it's better solve diameter using this style

    • @noobevsprorelation6838
      @noobevsprorelation6838 3 ปีที่แล้ว

      yaa we can solve it using diameter problem approach by making a class of tilt and sum but in my opinion it will take more space and time as well you can verify on leetcode.

  • @SumitKumar-sx1oi
    @SumitKumar-sx1oi 9 หลายเดือนก่อน

    400 vide ke bad memes xD

  • @ArnabGuides
    @ArnabGuides 3 ปีที่แล้ว +2

    Sir memes ke wajah se concentration me problem ho raha hai

  • @shahimran7421
    @shahimran7421 4 ปีที่แล้ว +1

    sir recorded complete course kabtak available hoga live courses ke price bohut zada hai sir can't afford waiting for recorded course

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      Free videos daal rhe hain to recorded free course ki ab koi relevance nahi

    • @shahimran7421
      @shahimran7421 4 ปีที่แล้ว

      okk sir

  • @manusharma5817
    @manusharma5817 3 ปีที่แล้ว +1

    is it just me or these memes are quite distracting...

  • @brucebatmanwayne8514
    @brucebatmanwayne8514 2 ปีที่แล้ว +1

    Please stop adding memes in between. We are not here to learn about memes here.

  • @khushikapoor1607
    @khushikapoor1607 4 ปีที่แล้ว +5

    sir zyada memes thoda distracting hojata hai ...thoda sa kamm daloge to better ho jyega

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +3

      Noted. You are our guide, we will produce the way you want.

    • @sachinduhan3022
      @sachinduhan3022 4 ปีที่แล้ว +1

      @@Pepcoding sarcasm on its peak. LoL

  • @kamnavarun3845
    @kamnavarun3845 4 ปีที่แล้ว +5

    the edit lol

  • @theuntoldtree
    @theuntoldtree 3 ปีที่แล้ว

    but sir said using global variable is paaap, hence u r doing paap here

  • @jonusbrothers2067
    @jonusbrothers2067 4 ปีที่แล้ว +1

    6:54 , sir aap b bhot cute ho :) :D

  • @cautioni
    @cautioni 3 ปีที่แล้ว

    tilt calculate hi kyu kr rhe hai agar koi use nahi hai toh?

    • @manindersinghsaluja5802
      @manindersinghsaluja5802 2 ปีที่แล้ว

      Final answer m sab nodes k tilt ka sum return karna h isliye

    • @nitin9042
      @nitin9042 2 ปีที่แล้ว +1

      Same question where us tilt variable is using in this can. Anyone explain??