AVL Trees Tutorial | Self Balancing Binary Search Trees

Sdílet
Vložit
  • čas přidán 21. 07. 2024
  • This is the second tutorial in the complete tree playlist of the DSA bootcamp for interview preparation: • Complete Tree Data Str... .
    In this video, we delve into AVL trees, which are a type of self-balancing binary tree, and a crucial data structure for coding interviews. You will learn about the inner workings and use cases of AVL trees and follow along as we implement them from scratch, backed by clear explanations and practical examples.
    Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!
    👉 Resources
    - Join Replit: join.replit.com/kunal-kushwaha
    - AVL code: replit.com/@KunalsReplit/Tree...
    - Complete Java DSA playlist: • Java + DSA + Interview...
    - Code, Assignments, & Notes: github.com/kunal-kushwaha/DSA...
    ➡️ Connect with me: kunalkushwaha.com
    ========================================================
    Timestamps:
    00:00:00 Introduction
    00:03:15 Problem with BST
    00:12:48 Self balancing binary trees
    00:15:31 AVL trees theory + algorithm
    00:34:36 Example walkthrough
    00:40:57 Time complexity
    00:42:22 Code
    01:04:24 Closing remarks
    #trees #placements #dsa

Komentáře • 354

  • @KunalKushwaha
    @KunalKushwaha  Před rokem +31

    👉 Resources
    - Join Replit: join.replit.com/kunal-kushwaha
    - AVL code: replit.com/@KunalsReplit/Trees-2-AVL

    • @Study_time-gs7xm
      @Study_time-gs7xm Před rokem +1

      please complete the dsa series, we are having to shift to other sources for it, but i want to complete it from you only... u are really good in explaining and detailed and simplified as well. thank u!

    • @prajapati1727
      @prajapati1727 Před rokem

      Thank You for the amazing session @KunalKushwaha . One Observation. Examples of the 4 cases can cause confusion as to how that state of the tree came into existence. For Instance, @ 30:56, assuming that order of insertion of g-node's children is t2, t3. Then, right-left case would get executed as soon as t2 gets added as a child to g-node, and at this point, t3 is not even added to g-node.
      Please correct me if I am wrong in the concept.

  • @kookiechan556
    @kookiechan556 Před rokem +161

    Please complete this java/dsa series not only me but many of my friends are waiting for this to complete and get placed in 2024. The best JAVA/DSA series ever. Great Job Man.

    • @krishnaprasadswain7010
      @krishnaprasadswain7010 Před rokem +6

      Yes bro..if you complete this course as soon as possible covering all topics....then you can be free from those comments for DSA

    • @insidiousop3487
      @insidiousop3487 Před rokem +3

      Hey bro can you help me ? I wanna know if i should do those assignments of follow a dsa sheet of other youruber

    • @kookiechan556
      @kookiechan556 Před rokem +2

      @@insidiousop3487 yeah, you should do those assignments those are worth it. Specially the leet code assignments provided by kunal those apply every topic's concepts.

    • @insidiousop3487
      @insidiousop3487 Před rokem

      @@kookiechan556 are those assignments enough ? Do i need to do any extra than that ?

    • @zanies6288
      @zanies6288 Před 11 měsíci

      ​@@insidiousop3487you would need to do extra for clearing OAs imo.

  • @hariharanas9702
    @hariharanas9702 Před rokem +4

    Thank you for posting this. I hope you find time and complete this playlist soon. Once again, thank you so much. Lots of love, Kunal ❤

  • @tanaypatel8412
    @tanaypatel8412 Před rokem +42

    Please Complete this playlist ASAP, learnt recursion from you man it is amazing.

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci +2

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

    • @SoumyarnjnPanda
      @SoumyarnjnPanda Před 5 měsíci

      @@Hamim-Talukdar you are correct bro

    • @SoumyarnjnPanda
      @SoumyarnjnPanda Před 5 měsíci

      @@Hamim-Talukdar i think something wrong in his code

    • @SoumyarnjnPanda
      @SoumyarnjnPanda Před 5 měsíci

      package Tree;
      public class AVL {
      private class Node{
      private int value;
      private Node left;
      private Node right;
      private int height;
      public Node(int value){
      this.value = value;
      }
      }
      public int height(){
      return height(root);
      }
      private Node root;
      public void insert(int value){
      root = insert(value, root);
      }
      private int height(Node node){
      if (node == null){
      return -1;
      }
      return node.height;
      }
      private Node insert(int value, Node node){
      if (node == null){
      node = new Node(value);
      return node;
      }
      if (value < node.value){
      node.left = insert(value, node.left);
      }
      if (value > node.value){
      node.right = insert(value, node.right);
      }
      node.height = Math.max(height(node.left), height(node.right)) + 1;
      return rotate(node);
      }
      private Node rotate(Node node){
      if (height(node.left) - height(node.right) > 1){
      if (height(node.left.left) - height(node.left.right) > 0){
      return rightRotate(node);
      }
      if (height(node.left.left) - height(node.left.right) < 0){
      node.left = leftRotate(node.left);
      return rightRotate(node);
      }
      }
      if (height(node.left) - height(node.right) < -1){
      if (height(node.right.left) - height(node.right.right) > 0){
      node.right = rightRotate(node.right);
      return leftRotate(node);
      }
      if (height(node.right.left) - height(node.right.right) < 0){
      return leftRotate(node);
      }
      }
      return node;
      }
      private Node rightRotate(Node p){
      Node c = p.left;
      Node t = c.right;
      c.right = p;
      p.left = t;
      p.height = Math.max(height(p.left), height(p.right)) + 1;
      c.height = Math.max(height(c.left), height(c.right)) + 1;
      return c;
      }
      private Node leftRotate(Node p){
      Node c = p.right;
      Node t = c.left;
      c.left = p;
      p.right = t;
      p.height = Math.max(height(p.left), height(p.right)) + 1;
      c.height = Math.max(height(c.left), height(c.right)) + 1;
      return c;
      }
      public boolean isBalanced(){
      return isBalanced(root);
      }
      private boolean isBalanced(Node node){
      if (node == null){
      return true;
      }
      return Math.abs(height(node.left) - height(node.right))

    • @gauravsinghjethuri5405
      @gauravsinghjethuri5405 Před 4 měsíci

      check the value of log 1000 with base 10. @@Hamim-Talukdar

  • @anjalitiwari5843
    @anjalitiwari5843 Před rokem +38

    Only today I have started doing this course n was little worried because it wasn't complete but what a coincidence that you continued posting today itself . Thank you so much kunal sir for teaching in such an awesome way. You are such an amazing teacher n a fabulous person to look up to. ❤

    • @shishiranjanthakur6495
      @shishiranjanthakur6495 Před rokem +2

      What else do you need from this bootcamp bro. Just advance data structure is remaining. But the content which is provided till now is enough for you to crack some tough coding problems.
      What you need more is just practicing more and more questions.

    • @notjod4948
      @notjod4948 Před rokem +1

      It would be complete soon you better start today!! 😅

    • @user-pj1wv1ns9x
      @user-pj1wv1ns9x Před rokem +1

      Sir it wud take so long there r 20 videos 1 video in a month or 4 or who nowsk

    • @tanaypatel8412
      @tanaypatel8412 Před rokem

      @@shishiranjanthakur6495 Kunal promised greedy and DP, so we need that too

    • @zanies6288
      @zanies6288 Před 11 měsíci

      ​@@shishiranjanthakur6495every good company asks dp questions which this course doesn't have rn

  • @notjod4948
    @notjod4948 Před rokem +4

    Was Manifesting Yesterday Here we go!! Thanks Kunal for giving us your important time and content 😌!!

  • @puspendra9330
    @puspendra9330 Před 10 měsíci +2

    I didn't know what AVL was, but thanks to your incredible video, I now have a clear understanding of it. loved it!

  • @harshit_ai
    @harshit_ai Před rokem +5

    Finally worthy content that deserves our attention

  • @shivashisharora367
    @shivashisharora367 Před rokem +13

    Thanks Kunal for being so committed to completing this playlist, I can only imagine how you'd be managing your full-time job alongside CZcams and all the other things you do. Thanks again and god bless you. Additionally, if you ever come to Cambridge and have some free time - would love to meet you!

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

    • @saibommakanti127
      @saibommakanti127 Před 6 dny

      @@Hamim-Talukdar log(1000) = 3, check again.

  • @ayushyadav1894
    @ayushyadav1894 Před rokem +4

    Thank you so much Kunal updating this series ❤

  • @karthikeyan.s2565
    @karthikeyan.s2565 Před rokem +3

    Thanks for the next video in the series brother
    Keep posting these videos and complete DSA asap please ❤

  • @swakal8868
    @swakal8868 Před rokem

    Kunal Kushwaha is new Superhero. Continue like this. Can not wait for your Dynamic Programming and P-NP lectures.

  • @SaumyaShukla118
    @SaumyaShukla118 Před 6 měsíci +12

    In the last question, the height of an AVL tree with n nodes is approximately log base2 (n) so the height should be around 10 not 3.

    • @_codewithyash
      @_codewithyash Před měsícem

      he made an mistake i guess in leftRotate and rightRotate when calculating the height of p and c.

    • @DNthegamer
      @DNthegamer Před měsícem

      Yes he made a mistake in calculating the heights after rotating it. the height I am getting is 9. Is it correct?

    • @user-sg5xm2xm2u
      @user-sg5xm2xm2u Před měsícem +3

      node.height = Math.max(height(node.left), height(node.right))+1;
      and
      private Node leftRotation(Node c){
      Node p = c.right;
      Node t = p.left;
      //rotate
      p.left = c;
      c.right = t;
      //update the heights
      c.height = Math.max(height(c.left),height(c.right))+1;//first update c than p bez c comes to below now
      p.height = Math.max(height(p.left), height(p.right))+1;
      return p;
      }
      private Node rightRotation(Node p){
      Node c = p.left;
      Node t = c.right;
      //rotate
      c.right = p;
      p.left = t;
      //update the heights
      p.height = Math.max(height(p.left), height(p.right))+1;//first update p than c bez p comes to below now
      c.height = Math.max(height(c.left),height(c.right))+1;
      return c;
      }
      check the sequence of the height of the p and c in left and right rotation

    • @goutam.02
      @goutam.02 Před 28 dny

      @@user-sg5xm2xm2u Yeah you are correct thanks for solution

  • @karthikeyanatuva3742
    @karthikeyanatuva3742 Před rokem +2

    Please Compete the DP and graph series completely ASAP. Your DSA Course is very useful and perfect of all DSA courses on youtube. Please do the course with more standard problems in the respective topic.

  • @laxmanprabhu9776
    @laxmanprabhu9776 Před rokem +2

    1st time I saw this video in recommendations, I cross checked for the upload timings 3 times🤣. Thank you kunal.

  • @nivetha8953
    @nivetha8953 Před 2 měsíci +2

    the best tutor ever in you tube.thanks for ur service.may god bless you with whatever u want , need

  • @samosapoint
    @samosapoint Před 6 měsíci +1

    You are a master in DSA. After watching your videos only got motivated to attend FAANG interviews.

  • @RidoyChandraDey
    @RidoyChandraDey Před 6 měsíci

    I don't know what happen when I watched Kunals tutorial. It's look like very simple to understand. Thanks again.

  • @sampriktamodak7890
    @sampriktamodak7890 Před 3 měsíci

    Great job Kunal.Learning DSA has become so easy watching your dsa bootcamp playlist!!! Waiting for the DP series :)

  • @yashwanthraj1146
    @yashwanthraj1146 Před 5 měsíci +3

    Finally I got a one who makes things easy..😄

  • @dhruv8871
    @dhruv8871 Před rokem +2

    Nice Kunal ....please dont stop now....Give us complete DSA n algorithms.

  • @RiyaSingh-ke7dq
    @RiyaSingh-ke7dq Před 19 dny

    thankyou so much the examples and your way of breaking down the creation of avial tree by adding more elements was really so simplified and i was finally able to understand with the concept of pgc everywhere it was too confusing and the number of examples that you took cleared all my doubts

  • @howsthephysics5822
    @howsthephysics5822 Před 8 měsíci +2

    Best video on CZcams for AVL the way you generalized 4 cases with parent child and grandchildren node was very helpful.

    • @KunalKushwaha
      @KunalKushwaha  Před 8 měsíci +2

      You’re welcome

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci +1

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

  • @nivasgopi2780
    @nivasgopi2780 Před rokem

    Excellent teaching!! Genuinely intelligent!! Thank you so much, Kunal

  • @abdooman1556
    @abdooman1556 Před 5 měsíci +1

    I've searched the internet, and yet haven't found a better video explaining AVL

  • @NeerajSingh-mc5kf
    @NeerajSingh-mc5kf Před 3 měsíci

    Earlier I was thinking to buy paid course, but u saved me, u r right no where in world i can get such DSA content, and beautiful explanation keep up good work Kunal. I am always left astounded at the level of dedication and hard work you put in every situation. May you reach every height of success!

  • @namankumarsrivastava4566
    @namankumarsrivastava4566 Před měsícem

    that such a perfect playlist pls complete it soon brother!!

  • @shubhambansal8794
    @shubhambansal8794 Před 4 měsíci +1

    It's getting more cooler day by day

  • @Rajyadav-yh3rz
    @Rajyadav-yh3rz Před 2 dny

    After following all the lectures .This was an easy one. Not a single doubt. Thanks kunal.

  • @kanyapandey
    @kanyapandey Před rokem

    I hope you are doing well Kunal, GOD bless you 🙏
    Thank you so much for sharing your knowledge and precious time. You’re the best 👏👏👏

  • @tharunch1865
    @tharunch1865 Před rokem

    finally kunal is back with bang, please continue this series bro

  • @UCANBRUH
    @UCANBRUH Před rokem +3

    FINALLY my man my motivator the legend is back 🎉🎉🎉🎉

  • @user-sw4iv4xk7v
    @user-sw4iv4xk7v Před 8 měsíci

    Thank you kunal for such an amazing content, your DSA course is very easy and simple to understand even hard topics, your explanation is great.

  • @kartikbhatt1695
    @kartikbhatt1695 Před rokem

    love you bro for continuing the dsa series
    Thanks a lot

  • @gauravsinghjethuri5405
    @gauravsinghjethuri5405 Před 4 měsíci

    Amazing video as always. thank you kunal please complete this playlist.

  • @yashdhanlobhe2985
    @yashdhanlobhe2985 Před 8 měsíci +1

    Seriously, when i was doing cp i tried a lot to learn this but i was not able to do it. I left cp and DSA one year ago and this video poped up so i thought let's give a try. And concepts are super clear i am wondering what was hard in this.😮 😮

  • @user-of5fb6nb9e
    @user-of5fb6nb9e Před rokem +1

    Thanks a lot for sharing this Sir! despite your busy schedule :)

  • @Raha2003_
    @Raha2003_ Před rokem +1

    I was waiting for it.
    I hope u upload next soon

  • @bravekiller2557
    @bravekiller2557 Před rokem

    Take a bow to this wonderful and intelligent guy.

  • @neelphadke2531
    @neelphadke2531 Před 3 měsíci

    Great explanation, and procedure of problem solving.

  • @VishalKumar-je1gq
    @VishalKumar-je1gq Před 10 měsíci

    Very in-depth explanation nice , thank you. For high quality stuff 🙂

  • @TechProcessor
    @TechProcessor Před rokem

    Awesome As Always and Thank You for giving your time

  • @rohansunwar9784
    @rohansunwar9784 Před rokem +4

    Such a great course but please can you deliver it in a consistent manner, you are a great teacher man, much appreciated for this course

  • @arnabchatterjee8556
    @arnabchatterjee8556 Před rokem +2

    Thanks Kunal
    I literally completed the trees vid one day ago ..

  • @madhubabu3482
    @madhubabu3482 Před 11 měsíci

    Super brother, you are awesome, you have a great patience and explaining things to us.
    Thanks alot....❤❤

  • @LowkeyCoder
    @LowkeyCoder Před rokem

    Finally❤❤❤ sir jaldi se kar do complete ploxx ❤

  • @yashpandey7041
    @yashpandey7041 Před rokem +1

    Cant wait for your DP series!!!

  • @deepakt4737
    @deepakt4737 Před rokem +1

    thanks ❤ for your lectures .. was waiting for this last one month

  • @harshit_ai
    @harshit_ai Před rokem +2

    I'm super happy, Thank you for this

  • @user-kb4tn4ej3p
    @user-kb4tn4ej3p Před rokem

    As usual, you rocked it kunal.

  • @srisri9611
    @srisri9611 Před 11 měsíci

    You are teaching stuffs which colleges struggles and fails to teach. Kudos

  • @HarshithMuthangi
    @HarshithMuthangi Před měsícem +1

    Great Explanation 👍👍

  • @akashnag6459
    @akashnag6459 Před 10 měsíci

    Hey Kunal, So nice of you to post this incredible content. Requesting you to please teach GRAPH and DP also.

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

  • @devdutdivine
    @devdutdivine Před rokem +5

    Hey Kunal you are giving great quality content which we may not get even in paid one thank very much for this
    I have request pls complete this bootcamp ASAP as after 2 month placement process will start and I am following your course....pls pls🙏🙏🙏

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

    • @devdutdivine
      @devdutdivine Před 8 měsíci

      @@Hamim-Talukdar log(1000) == 3 check the log formula

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      @@devdutdivineHere the base of the log is 2. So log(1000) of base 2 is == 10

  • @taongasoko4716
    @taongasoko4716 Před 11 měsíci

    Thank you sooo much, please continue it sir!, I appreciate it greatly

  • @ShiviThagele-lv4si
    @ShiviThagele-lv4si Před 10 měsíci

    thanks for continuing the course

  • @richarai828
    @richarai828 Před rokem +2

    Thankyou so much! I really needed it.

  • @bangtangirl1632
    @bangtangirl1632 Před 24 dny

    Kunal 😢 you are such an angel . Thank you so much

  • @ashis.di.sardar
    @ashis.di.sardar Před 10 měsíci

    You teach like a PRO!

  • @user-by1ve7gj8m
    @user-by1ve7gj8m Před 4 měsíci

    Thanks man for sharing such great video on AVL, As you said balancing trees is just a piece of cake at the end of the video is so true after watching this AVL video of yours.
    .

  • @nishantagrawal6318
    @nishantagrawal6318 Před rokem

    Thanks Kunal for uploading it....

  • @mlvibes8310
    @mlvibes8310 Před rokem

    Thank you ❤ Bhiya, god of DSA thanks gain

  • @prakritiparmar3055
    @prakritiparmar3055 Před rokem

    Thanks bro for this amazing session ❤️......I was waiting for it

  • @Aniket_0314
    @Aniket_0314 Před 11 měsíci

    lovely video, enjoyed a lot and understood. Thanks ❤

  • @satestactmathtutor6570
    @satestactmathtutor6570 Před 11 měsíci

    finalllyyy here we goo for the next video

  • @thor1626
    @thor1626 Před rokem +20

    Hi Kunal, firstly i want to say that I cannot thank you enough for this series.
    Secondly I have some questions:
    1: Do you yourself revise these concepts before making videos, and is that one of the reason why these videos take so much time.
    2: How many and what videos have you planned to upload next?

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci +1

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

    • @pratheeeeeesh4839
      @pratheeeeeesh4839 Před 8 měsíci

      @@Hamim-Talukdar😂

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      @@pratheeeeeesh4839 why you are laughing man. I already have figure out the answer. There was a single code mistake in the Kunal vi AVL tree implementation, that's why it was giving wrong answer. Actually the answer will be 9. If you fell I'm wrong then google it.

  • @bhaveshanandpara8474
    @bhaveshanandpara8474 Před 10 měsíci +10

    I had a doubt please correct me if I am wrong. AVL is self balancing *BINARY TREE* so if there are 1000 nodes shouldn't height should be [ Log 1000 base 2 = 9 ] than [ Log 1000 base 10 = 3 ]

    • @KunalKushwaha
      @KunalKushwaha  Před 10 měsíci +13

      yes, I did +1 inside bracket by mistake

    • @user-nw6jx7eb8f
      @user-nw6jx7eb8f Před 3 měsíci

      I too got the same doubt

    • @mohamedsaiidouertani3568
      @mohamedsaiidouertani3568 Před 3 měsíci +6

      @@KunalKushwaha thank you for all your effort you are great, but we made another misatke in leftrotate() function we should update the height of c before the height of p to get the correct height
      c.height = Math.max(height(c.left), height(c.right) )+1;
      p.height = Math.max(height(p.left), height(p.right) )+1;
      return p;

    • @harshrajushire429
      @harshrajushire429 Před 2 měsíci

      @@mohamedsaiidouertani3568 can you tell me reason why i should update c first then p

    • @AyushGupta-uq6lp
      @AyushGupta-uq6lp Před 2 měsíci

      @@mohamedsaiidouertani3568 thanks .. that was the major error .. beacuse of this algo was giving the avl tree as unbalanced.

  • @aryansharma4509
    @aryansharma4509 Před rokem

    i am really enjoying your videos and I did to much with the help of content (it is top notch better then any paid courses ) only request is please make all other topics of DSA little fast be regular please....

  • @itspraskpatel
    @itspraskpatel Před 8 měsíci

    Thanks Kunal for such a great Explanation.

  • @minthat7677
    @minthat7677 Před 8 měsíci +1

    I Just love the way you teach 😊Thank you so much for posting these videos

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

  • @user-yv4yp9nv6f
    @user-yv4yp9nv6f Před rokem

    You are awesome, wish you all the best

  • @beatx2173
    @beatx2173 Před rokem

    Life is good when Kunal posts java videos

  • @thanirmalai
    @thanirmalai Před měsícem

    Truly Amazing

  • @prashlovessamosa
    @prashlovessamosa Před rokem

    Your channel and pepcoding are the best

  • @aayushsharma1106
    @aayushsharma1106 Před 7 měsíci

    Thank you kunal for these amazing videos.

  • @ayushsrivastava2448
    @ayushsrivastava2448 Před 6 měsíci

    great stuff!

  • @areebamakhani5245
    @areebamakhani5245 Před 8 měsíci

    DSA exam on Monday. You're the only help. Best ever java DSA playlist.
    THANKYOU MAN !!✨

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10. So, the output has to be 10. What do you think?

  • @shubhamagarwal1434
    @shubhamagarwal1434 Před 9 měsíci

    # GOD Of DSA
    Hi I am a 11yr exp java guy was searching for some free course on youtube for DSA came accross your course and i just feel love in it...all in one place that too with java...i must say you have done very awsome work...your name will be there on this earth as long as DSA will be asked in interviews...May God Vishnu Bless You :)

    • @Hamim-Talukdar
      @Hamim-Talukdar Před 8 měsíci

      Hey, the height of the tree shouldn't be 10 because log(1000) == 10, right? So, the output has to be 10. What do you think?

  • @mdmoazzumshahansari1681
    @mdmoazzumshahansari1681 Před rokem +1

    Hey kunal I am learning dsa from this course is there any chance if a video on string may come, I mean a problem solving or something like that??.. I am struggling a little with soving questions of strings

  • @user-wy2ok5hx3g
    @user-wy2ok5hx3g Před 3 měsíci

    thank you for the clear concepts!

  • @HamzaKhan-wi9kb
    @HamzaKhan-wi9kb Před rokem

    Sunli bhai ne apni 🙏

  • @aashashanmugam
    @aashashanmugam Před 2 měsíci

    Awesome!!

  • @BROOKnim
    @BROOKnim Před 11 měsíci +1

    DAMN man, its was super easy understanding this concept.
    one doubt/mistake. ( i believe you made this mistake in leftRotate )
    when calculating height of the node 'p' (new parent) in left rotate , since 'c' (old parent) is going to beon left child of 'p' (new parent), we have to first modify the height of old parent 'c' before modifying the new parent 'p' .
    well this was due to the variable names where noramlly parent shouldve been 'p' but we take 'c' to make it similar to the diagram
    again, thanks for this amazing tutorial

  • @user-og2mw6sc6i
    @user-og2mw6sc6i Před 5 měsíci

    nice lecture kunal !!!

  • @poorpanda9033
    @poorpanda9033 Před 10 měsíci

    Thank You so much! Amazing Explanation as always #DSAwithKunal

  • @user-bm4cq6xe4t
    @user-bm4cq6xe4t Před rokem

    Course is really excellent .I have bought paid course also but this dsa course is far better then any course available in market .
    But the only problem is that when it will be completed ? Could you please complete it ASAP .🙏

  • @a-classzone1998
    @a-classzone1998 Před rokem

    Thats a relief....
    I thought he will never post again.

  • @drex-0299
    @drex-0299 Před 11 měsíci +1

    Loved it!

  • @anishaa3298
    @anishaa3298 Před 11 měsíci

    this is amazing!!! thank you so much!!!!!!!

  • @maheshtamrakar369
    @maheshtamrakar369 Před 3 měsíci

    Great video

  • @neilkapadia5407
    @neilkapadia5407 Před 7 měsíci

    Amazing Amazing explanation!!!!

  • @code_easy_
    @code_easy_ Před rokem

    Awesome kunal❤

  • @jk-sm6qr
    @jk-sm6qr Před 5 měsíci

    Very nice kunal

  • @ujjwalshrivastava-xs5lx
    @ujjwalshrivastava-xs5lx Před 10 měsíci

    Amazing video loved it

  • @AtharvaRao0104
    @AtharvaRao0104 Před rokem

    Kunal can do anything easily.. Kunal for president ❤

  • @LowkeyCoder
    @LowkeyCoder Před 9 měsíci

    another masterpiece by kunal

  • @user-jb6ey8wn4i
    @user-jb6ey8wn4i Před 10 měsíci +3

    Bharata kunal great content but i think you did the height update in the left and right rotate is wrong can you cross check it. i think the +1 will be outside of math max function
    love your content

  • @darkseid3427
    @darkseid3427 Před rokem +1

    Hey kunal I know this is off topic but can you please make a video on how to craft a devops & cloud resume for freshers for worldwide opportunities

  • @cadc-pn1ir
    @cadc-pn1ir Před 3 měsíci

    There is a small bug in 1:02:11 . The +1 should be outside of Math.max() function.
    Great Explanation Sir. Enjoyed aLot. Thank you so much for this lovely content

  • @rajadommeti8744
    @rajadommeti8744 Před rokem +1

    hoping you post the videos faster than usual kunal.....your explanation is really awesome yaar.........