AVL Trees Easiest Explanation | Insertion, Deletion, Minimal AVL Tree | All in one in 3 hours

  Рет қаралды 15,801

GO Classes for GATE CS

GO Classes for GATE CS

Күн бұрын

Пікірлер: 86
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Please Find Annotated Notes Here - shorturl.at/swB16 Please Find Practice set containing 30 questions - shorturl.at/npABT
@snehasishbhakat7202
@snehasishbhakat7202 Ай бұрын
Question 1:-------- a) Avl tree b) Not Avl tree c) Not Avl Tree d) Not Avl tree e) Avl Tree
@Abhilekh518
@Abhilekh518 Ай бұрын
What a explanation ❤ Amazing 😍❤
@ishwardhande1847
@ishwardhande1847 Жыл бұрын
loved the use of terms "stick" , "elbow" , "mountain" than those heavy words LL ROTATION, LR ROTATION...😍🤩
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
When life gives you AVL "mountain" then just grab a "stick" and march on 🏔. The best part part is you won't even get a crack in your "elbow". ❤
@ishwardhande1847
@ishwardhande1847 Жыл бұрын
@@GOClassesforGATECS 🤩
@al_ted
@al_ted Ай бұрын
@@GOClassesforGATECS what a puch line guruji💯
@ujjwalsingh3415
@ujjwalsingh3415 Ай бұрын
Respected sir, I have never studied bst deletion and teacher has skipped this topic by saying that it is not important for the GATE. I am lucky enough to find this video which made my day. Thank you sachin sir❤❤
@devanshmaru3146
@devanshmaru3146 Жыл бұрын
I nearly study this concept 3 times in past but after that also learning some new things about AVL tree in this video.such a great explanation and terminology.
@AshutoshPradhan-_-
@AshutoshPradhan-_- Жыл бұрын
Hi guys, please note that at 10:48 --> null node (i.e. left node of 1) has a height of (-1) in this case. Hence, the balance factor of node 1 becomes (-1) - 1 = (-2). 😊
@deepshikhasharma269
@deepshikhasharma269 9 ай бұрын
Sir, other teachers just tell to cram the deletion cases of AVL trees but you have made it so easy to understand with a simple algorithm!! 💯🙏
@omikakadiya
@omikakadiya Жыл бұрын
Sir very nice way of explaining using stick , elbow and mountain Me to GoClasses : "EK hi dil he kitni baar jitoge"
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Thank you Omi Kakadiya for your appreciation. It fills us with love to see that you thoroughly enjoyed it.
@AkashRoy-do2dg
@AkashRoy-do2dg Жыл бұрын
deletion of nodes in avl tree part was the absolutely Best explanation I've ever seen in youtube ! nonetheless great explanation overall
@lokeshpatil8123
@lokeshpatil8123 Ай бұрын
Simply Amazing...There are no words left from my side to appreciate the teaching quality by Sachin sir. Loved it. Thank you very much sir, for such a crystal clear and in-depth explanation of a complex topic like AVL trees.
@guruguruji726
@guruguruji726 6 ай бұрын
Amazing explanation sir. Never ever understood AVL tree like this before.. will never forget it now.
@mansikatiyar1850
@mansikatiyar1850 Жыл бұрын
Never knew all these concepts can be so easy....thankyou sir for such great explanation!!!😁
@shashankaggarwal4323
@shashankaggarwal4323 Жыл бұрын
Found this topic explained very well in this video with new easy terms "Stick", "elbow", "mountain" instead of LL, LR, etc. Appreciate the efforts sir.
@akashdebnath3570
@akashdebnath3570 Жыл бұрын
One of the best topic in DS course... Sir really made all things very much intuitive, Thank you for this amazing video ... ❤😀
@al_ted
@al_ted Ай бұрын
Diya h naam stick, mountain , elbow to bnta h bda sa WOW💥
@Indian45528
@Indian45528 23 күн бұрын
Best explanation ever on AVL trees 🌲🌳🌴
@kumarshubham650
@kumarshubham650 Жыл бұрын
beautiful explanation , and most important no need to mug up the formula.
@pankajbadgujar5215
@pankajbadgujar5215 Жыл бұрын
Thankyou sir for explaining such complex concept in simple way
@abhishekprasanna5725
@abhishekprasanna5725 Жыл бұрын
Sir pls do post more such valuable content, we deeply appreciate your effort and content, thanks!
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
We appreciate your feedback Abhishek. Thank you for sharing. We'll keep adding more & more quality content.
@abhiraj_001
@abhiraj_001 Жыл бұрын
Amazing content sir.. elbow and sticks made the topic so easy instead of those LR RL LL RR things
@testing2066
@testing2066 Жыл бұрын
To appreciate, I left a comment!
@visiblegamerff3875
@visiblegamerff3875 2 ай бұрын
Just loving the content (1 after the other)
@aka_akaran
@aka_akaran Жыл бұрын
Great Explanation, those stick elbows and mountains make the life easier.
@sahillather002
@sahillather002 Ай бұрын
Sir explains concepts in so easy way, feels like intutive always. Thanks sir ji 🙏
@shaad_iqbal
@shaad_iqbal Жыл бұрын
Simple and elegant explanantion of AVL trees. You made this topic really intuitive. Thank you sir. ❤
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Glad you liked it. Your feedback motivates us.
@PUSHKIT01
@PUSHKIT01 Жыл бұрын
Best ever full topic on avl tree.👍💯
@puspeshsrivastava4820
@puspeshsrivastava4820 Жыл бұрын
Just Brilliant👌
@eesnehhil
@eesnehhil 3 ай бұрын
Thankyou 😊
@charumehta2364
@charumehta2364 Жыл бұрын
Thank you so much sir for such a great and easy explanation..🙂
@AnanyaK99
@AnanyaK99 4 ай бұрын
AMAZING LECTURE! Did not know AVL Trees can be sooooo interesting!
@sutamasarkar7745
@sutamasarkar7745 3 ай бұрын
this is awsome
@gauravrajpurohit882
@gauravrajpurohit882 Жыл бұрын
for RR rotation the code will be like : RR_rotation(X){ struct AVLnode *temp= X-> right; x->right = temp -> left; temp->left=x; return temp} PS:-Ignore the syntax error.
@keyurpadiya3607
@keyurpadiya3607 2 ай бұрын
thoroughly enjoyed this 3.5 hours movie🤓
@GOClassesforGATECS
@GOClassesforGATECS 2 ай бұрын
Amazing. ❤❤
@kartikeyrana3736
@kartikeyrana3736 4 ай бұрын
this video made easy AVL for me, and after watching the node deletion part it made me go wallah walla and filled me with zeal ;)
@Nothing-ty1yr
@Nothing-ty1yr 2 ай бұрын
Say all coaching centres
@nayanmodi8556
@nayanmodi8556 Жыл бұрын
AMAMZING, SIMPLE AND EASY TO UNDERSTAND, Thank you sir :)
@ayushjain386
@ayushjain386 Жыл бұрын
Best lecture ❤
@DoctorK2105
@DoctorK2105 Жыл бұрын
Thank you ❤
@MohddAlii
@MohddAlii 2 ай бұрын
AVL tree- My goal is always to reach the mountain.
@kousikgunturu
@kousikgunturu Ай бұрын
Enjoyed the Video , Great Video sir ❤
@kamalgupta5954
@kamalgupta5954 Жыл бұрын
@03:20:00 N(h) :- no. of AVL trees of height 'h' N(h) = N(h-1)*N(h-2) + N(h-1)*N(h-1) + N(h-2)*N(h-1) = N(h-1)*[N(h-1) + 2*N(h-2)] N(0) = 1 N(1) = 3 N(2) = 15 N(3) = 315
@AnanyaK99
@AnanyaK99 4 ай бұрын
what is this formula for?
@user-hl6xe8dz9x
@user-hl6xe8dz9x 2 ай бұрын
​@@AnanyaK99 To calculate all possible no. of different AVL trees. The formula given in slides is only limited for minimal no of AVL trees that is how many possible no of AVL trees constructed for given height using minimum no of nodes which is actually based on minimum no of nodes required to construct maximum height tree N(h) = N(h - 1) + N(h - 2) + 1 and similarly by analysing this recurrence relation idea we made the intuition for no of minimal AVL trees which is N(h) = 2*N(h-1)*N(h-2) [this relation only uses minimum no of nodes for given height h to construct all possible AVL trees {balancing factor -1 and 1}] now add N(h-1)*N(h-1) to the same recurrence relation to cover balancing factor 0 so now you are welcoming to add more nodes not only limited to minimum but up to maximum nodes up to that height and when recursively applied it's easy to visualise how beautifully this recurrence relation capturing all the Scenario.
@ex0rrr
@ex0rrr Жыл бұрын
Wonderful lecture!!!
@chetanbankar-d9u
@chetanbankar-d9u Жыл бұрын
Nice Explanation Sir Thanks
@ujjalroy65
@ujjalroy65 10 ай бұрын
awsomeeeee
@GateGeeks
@GateGeeks Жыл бұрын
Thank you Sir for such a wonderful lecture.
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Thank you for sharing your feedback. It motivates us.
@2avulacharithareddy693
@2avulacharithareddy693 5 ай бұрын
Super explanation
@rushikeshsisode1533
@rushikeshsisode1533 5 ай бұрын
really a great video
@DarkK_Kknight
@DarkK_Kknight Жыл бұрын
Even on my death bed I may forget about my whole life journey but one thing which I am damn sure I won’t forget is Avl trees….lol
@rethickpavan4264
@rethickpavan4264 Жыл бұрын
There is mistake @1:02:00 the Node must be inserted on right to make it unbalanced ❤
@junaidaj7450
@junaidaj7450 Ай бұрын
Thank you sir
@gauravkadyan321
@gauravkadyan321 Жыл бұрын
in practice set question no 11 what if we delete node 1,3,2,7 then node for is imbalance and there is elbow pattern, is it cause double rotation or not?
@GateGeeks
@GateGeeks Жыл бұрын
at 2:04:20 the question itself is incorrect since it is not a BST at node 12 left child is 13 which is violating the first condition of AVL Tree.
@AmithKumar-h8p
@AmithKumar-h8p Жыл бұрын
yes node 13 is left of 12. sir please its typo mistake
@kafkatamura2461
@kafkatamura2461 Ай бұрын
Exactly
@ishwardhande1847
@ishwardhande1847 Жыл бұрын
Thank you sir for such great Explanation😃
@AmithKumar-h8p
@AmithKumar-h8p Жыл бұрын
9:29 height of null node is -1 throught out AVL tree? sachin sir?
@al_ted
@al_ted Ай бұрын
previously i by hearted the time complexites but after learning from here i can even derive at any time if someone ask me
@swasthikl.k2312
@swasthikl.k2312 Жыл бұрын
Does go classes give pendrive course
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Hey @swasthikl.k2312, currently we don't offer pendrive courses. You can access our video lectures through our website and app.
@amlanmajumdar7722
@amlanmajumdar7722 Жыл бұрын
So,If I generalize the pattern of min possible height of an avl tree with n nodes then can i say it will be floor(log(n))?
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
How you are coming up with this formula?
@amlanmajumdar7722
@amlanmajumdar7722 Жыл бұрын
Just while calculating some particular case,but i have not found any counter example. like---------- 15 nodes is there, min AVL tree height possible-- 3 when 16 nodes will be there the min height will be --- 4 so, 8 nodes to 15 nodes all will be min height possible ----- 3 and from here i am coming up with this formula
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
@@amlanmajumdar7722 This is not a way to drive solution. You need to solve reccurance relation.
@adityaghosh6170
@adityaghosh6170 Жыл бұрын
Sir its a request if you could atleast make one introductory video on graph data structure. It would be very kind of and it would be very helpfull to us as well
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
We have videos on graph data structures like adjacency matrices, lists, etc within the course. We have not uploaded all videos on KZbin, You can always enroll to watch all videos. www.goclasses.in/courses/GATE-CSE-Complete-Course
@chanjeevkantkumar4365
@chanjeevkantkumar4365 Жыл бұрын
Sir, please correct if i am wrong? , sir for minimal avl tree , we need one node at last level but that node can be child of any of the node in previous ,so every node in previous level has the chance so #nodes in minimal avl tree = 2^h
@bholasaxena8741
@bholasaxena8741 Жыл бұрын
Sir there is no pinned comment for notes.
@adityaghosh6170
@adityaghosh6170 Жыл бұрын
Evening sir, The question that you have made by yourself after the part-2 deletion timestamp. The question says remove 53 and then 11. Sir after deleting 53 and then after balancing the tree, 11 turns out to be the root node. What should we do in that case. If the question is telling to Remove the root node???
@eesnehhil
@eesnehhil 3 ай бұрын
You should delete it the same way as you do deletion in BST. Replace it with its inorder successor or inorder predecessor. After that, balance it if any node turns out to be imbalanced.
@jupitertheinvincible7998
@jupitertheinvincible7998 Жыл бұрын
2:03:02 is it even a BST? left child of 12 is 13 which is >12
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
Yes right, you have the option to consider an alternative value for that position, such as 11.5. Changing the value to any other number will not affect the explanation.
@jupitertheinvincible7998
@jupitertheinvincible7998 Жыл бұрын
@@GOClassesforGATECS yes sir. the explanation is amazing. operations on avl trees now seem so easy after watching this video
@GOClassesforGATECS
@GOClassesforGATECS Жыл бұрын
@@jupitertheinvincible7998 Thanks for the appriciation. We are glad that the video helped you.
@Jaibalayya-ju1gf
@Jaibalayya-ju1gf 28 күн бұрын
2:04:27 13 is left to 12 which doesn't makes it a BST pls correct it sir
@m1_lan____
@m1_lan____ Ай бұрын
Munna bhai can see gandhi ji ...I can see AVL tree
AVL Trees & Rotations (Self-Balancing Binary Search Trees)
20:38
Back To Back SWE
Рет қаралды 352 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 119 МЛН
Threaded Binary Tree (TBT) IN Data Structure Explaination
19:17
Vivekanand Khyade - Algorithm Every Day
Рет қаралды 204 М.
10.1 AVL Tree - Insertion and Rotations
43:08
Abdul Bari
Рет қаралды 1,2 МЛН
Quiet Night: Deep Sleep Music with Black Screen - Fall Asleep with Ambient Music
3:05:46
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 17 М.
AVL trees in 5 minutes - Intro & Search
5:00
Michael Sambol
Рет қаралды 83 М.