Hey man just realized I never actually thanked you, I passed my interview and your videos were so much help!!! You are awesome!
@BackToBackSWE4 жыл бұрын
great - flourish in life friend
@DavidVCastro Жыл бұрын
@TheAntloo, how many times have you used an AVL Tree in your job of two years? 🙂
@yonathanmichael19103 жыл бұрын
This kid's older brother is one of my little homies from college. Now i'm reviewing algorithms and the little little homie is teaching me. Both impressive young men who are making their families proud.
@BackToBackSWE3 жыл бұрын
haha hey
@WyMustIGo3 жыл бұрын
Looks like this homie stopped the videos because there is no money in teaching for free. That means he gained wisdom and is using his knowledge to make a profit instead... Homie is getting wise.
@BackToBackSWE4 жыл бұрын
Check out the free DSA Mini-Course 👉backtobackswe.com/five-day Table of Contents: Introduction 0:00 - 2:07 Tree Height 2:07 - 3:51 Node Balance 3:51 - 4:21 Balance Calculation Practice 4:21 - 7:32 Breaking The AVL Property 7:32 - 8:32 Rotations 8:32 - 12:52 Right Rotation 12:52 - 15:58 Left-Right Rotation 15:58 - 18:12 Left Rotation 18:12 - 18:50 Right-Left Rotation 18:50 - 19:44 Support Us At backtobackswe.com 19:44 - 20:37 Errors: 0:19 - 1:41 The is not a BST, this is fixed at 1:41. 11:08 NIT: The purple triangle is > y (strictly greater) and > x I hope this helps someone. If there are any mistakes let me know and I'll update the "Errors" section.
@arjunkashyap88964 жыл бұрын
This is the clearest explanation I have seen on Balanced Trees so far. I was trying to learn this topic back in march and I could not find a good resource to understand and I dropped this topic. Now today I picked it back up and I found your video. Thank you so much !! ---> Subscribed
@BackToBackSWE4 жыл бұрын
sure!!
@BoonkiCoC14 Жыл бұрын
Before i watch the video again gotta let you know, this was hands down the best illustration ideo for AVL trees. The illustrations are easy to follow. Cheers.
@doublaitmaxim75404 жыл бұрын
I have a test tomorrow on binary trees and this video really helped me out so thank you so much! !!
@BackToBackSWE4 жыл бұрын
great
@abhinavsingh42214 жыл бұрын
Just few moments ago I was really missing you and your content and now your video is here!! Welcome back buddy :)
@BackToBackSWE4 жыл бұрын
hey.
@rustyshackleford26052 жыл бұрын
The clarity of your explanation is astounding. Thanks a bunch!
@BackToBackSWE2 жыл бұрын
Haha! thanks. Try out the free mini course on our website - backtobackswe.com/
@weallgotwoodandnails4 жыл бұрын
Clear, concise, and invaluable. Thank you for uploading this.
@BackToBackSWE4 жыл бұрын
thanks - sure
@eishkapoor7033 жыл бұрын
Hey man, don't comment alot but I just wanna thank you for being a big part in me getting an internship. The work you do is invaluable, and I for one really appreciate it. Keep grinding these out, you got a life long sub in me
@nands44103 жыл бұрын
Congratulations Where did you get the internship at
@yutaitadori73183 жыл бұрын
Yeah eger to know @Eish
@BackToBackSWE2 жыл бұрын
Congrats mate! Keep hustling
@shilpag084 жыл бұрын
I actually like you being on the frame. Helps to focus more and real lecture feeling
@BackToBackSWE4 жыл бұрын
nice
@ishaansrivastav57324 жыл бұрын
Its hard to find a teacher who explains better than you SWE. Also, +1 on the tries tutorials would love that
@BackToBackSWE4 жыл бұрын
thanks and ok
@stevendeng27584 жыл бұрын
It's definitely the best course that I've ever seen about AVL tree.
@BackToBackSWE4 жыл бұрын
thanks
@hascuhas Жыл бұрын
Thank you, I never understood AVL trees from my university courses. Your explinations made it crystal clear for me.
@dramallama1112 ай бұрын
As always, why is that some guy on youtube can explain these concepts so much better, and in a shorter amount of time than most college professors? It boggles the mind.
@MoscleBrog9 ай бұрын
my god i understood his explaination and i feel fun doing this work it kinda feel like rubiks cube. this channel is a magic of understanding
@DanielDiaz-rq3ko2 жыл бұрын
I know this video came out awhile back but if you see this, thank you so much! I just didn't understand it in class and when my professor explained it again to me. You literally made this such an easy concept to get!! Thank you !!!!
@BackToBackSWE Жыл бұрын
Glad it helped!
@Delinester10 ай бұрын
This author explained AVL trees better than our professor in 2 lectures. Thank you!
@BackToBackSWE9 ай бұрын
Happy Holidays 🎉 Thank you for your kind words, Delinester! We'd love to offer you a 40% Off our exclusive lifetime membership just use the code CHEER40 - backtobackswe.com/checkout?plan=lifetime-legacy&discount_code=CHEER40
@OktayDerman8 ай бұрын
professors are like not-teaching teachers at schools stay away from them, go after assistants.
@jenweatherwax71134 жыл бұрын
Lost me when counting nodes became positive and negative @6:10 ...is it negative when you go right, and positive if left?
@BackToBackSWE4 жыл бұрын
Hi, is this referring to balance at a node?
@jenweatherwax71134 жыл бұрын
Back To Back SWE Yes 😂 that is very confusing for me. All the positive 1 and negative 1 values
@hawadoh7 ай бұрын
After spending 12 hours non-stop trying to fix just one bug in my AVL tree (with parent node pointers) I've decided to take a step back and watch this video, and this is so much help! I am going to try again now after eating
@akshayagarwal27144 жыл бұрын
Benyam, you are PRO man! I am fan of your teaching style! Your videos have helped me a lot in my prep. Now I have come back for yet another interview, going though your videos first for a quick learning. May this channel be in everyone's recommendation! KZbin you better be listening! XD
@BackToBackSWE4 жыл бұрын
thanks - we are humbled
@manhalrahman57854 жыл бұрын
Thanks I used to hate avl trees a lot because of rotations. But this video fixed it
@BackToBackSWE4 жыл бұрын
great.
@marcocaniglia20474 жыл бұрын
awesome video, my professor should watch these before lecturing lmao. Thank you!
@BackToBackSWE4 жыл бұрын
lol thanks!
@svenzanetti56373 жыл бұрын
Very clear explanation! Is the tree at 8:30 actually a BST though? Because 0 is to the right of 2...
@BackToBackSWE3 жыл бұрын
I think I correct it
@Rishirajsingh27584 жыл бұрын
Hey bro , I have loved your teaching methodology , I have started visualising the algorithms , I love you man thank you so much. Could you try to cover up segment trees if possible
@BackToBackSWE4 жыл бұрын
great. and yes.
@JessPen002 жыл бұрын
my professor literally puts me to sleep, thank you so much for this video
@BackToBackSWE2 жыл бұрын
Haha! explore our full DSA based courses with promo code ‘KZbin40’ with a 40% discount - backtobackswe.com/pricing
@adarshsharmanit3564 жыл бұрын
Welcome Back Brother ...Love from INDIA
@BackToBackSWE4 жыл бұрын
love from 'MURICA 🚜🌽
@adarshsharmanit3564 жыл бұрын
@@BackToBackSWE Learnt new word "MURICA" LoL
@BackToBackSWE4 жыл бұрын
@@adarshsharmanit356 nice
@thatoneguy9287 Жыл бұрын
Thank you, it definitely helped alot but still i cant figure how do i determine if i need a left or a right left rotation? Like on what do i have to look to know which to use?
@WatchM3Fail3 жыл бұрын
This is the simplest vid I’ve seen on this, thanks!
@BackToBackSWE3 жыл бұрын
Glad you liked it!
@mystica72844 жыл бұрын
yo welcome back!!! thanks for helping us. ;)
@BackToBackSWE4 жыл бұрын
sure.
@0x1h0b4 жыл бұрын
thank god !!.. finally you are back.. good to see you buddy
@BackToBackSWE4 жыл бұрын
hey.
@marcspataru3 жыл бұрын
I have a really important interview tomorrow. If I remember I’ll come here and update.
@sexcommunist3 жыл бұрын
Hey, how was your interview?
@moosegoose12823 жыл бұрын
i exited out my prof zoom lecture to watch this. thank u
@BackToBackSWE2 жыл бұрын
haha! try our free mini course to explore more cool stuff - backtobackswe.com/
@KanekiSidibe2 жыл бұрын
This tutorial is awesome, since there is no dislike button, I just let you know in advance !
@IStMl3 жыл бұрын
finally a natural explanation
@shine0nme1353 жыл бұрын
absolutely loved the way you explain the concept here thanks a lot this really helps me
@TrueDetectivePikachu2 жыл бұрын
right in 6:09 I decided to just pause and get to code to see if I can understand it. I ended up with something not very stable but it works XD Done in Python, I'm not sure if this may be O(n log n), it prolly depends on how bad the tree that is traversing is class Node(object): def __init__(self, data=None): self.data: object = data self.left: Node = None self.right: Node = None def get_height(b: Node): def inner(b: Node): if b is None: return -1 return max(inner(b.left), inner(b.right)) + 1 return abs(inner(b.left) - inner(b.right))
@TrueDetectivePikachu2 жыл бұрын
still figuring out how to implement the rotation btw, ended in either a stack overflow or loosing a bunch of nodes along the way
@gcraneorigami3 жыл бұрын
Absolutely stellar explanation
@BackToBackSWE3 жыл бұрын
thx
@GeovaniLopesDias5 ай бұрын
In english, LR and RL rotations are so intuitive! In Portuguese, I'm struggling to get what the heck a "double left" rotation looks like...
@cocoarecords4 жыл бұрын
The legend is back with a new video
@BackToBackSWE4 жыл бұрын
I am normal.
@arrahul3164 жыл бұрын
Thanks bro....this is a great content. It will be useful if we have an example where we have say 5 or greater number of nodes and left or right right heavy with left->right or right->left rotation explained. Again, many thanks for this content. You just rock.. Another suggestion is whether we could explain some practical applications of each DS/Alg as and when you cover them in each video. Like now I know what is AVL tree's properties-> Self balancing. Now where is this Self balancing mandatory in some real world problems. Yes we could google this out or get from intuition. But it will be good conclusion to any video you present, once you have this explained. Again, just a thought. Not an absolute requirement. Thanks Bro. Have a good one!
@BackToBackSWE4 жыл бұрын
sure - ok, and u too
@kirillzlobin7135 Жыл бұрын
12:45 How did we fix the balance if the tree became heavy on the other side
@chrispy8084 ай бұрын
Best explanation of this thank you!
@brainwizard89153 жыл бұрын
Wow what a sleek explanation
@BackToBackSWE2 жыл бұрын
haha
@user-zm3uw5ij9r4 жыл бұрын
please do a video on explaining the red black tree.....and comparision of red black tree and avl tree
@BackToBackSWE4 жыл бұрын
maybe.
@jkim51184 жыл бұрын
Welcome back, Ben!
@BackToBackSWE4 жыл бұрын
hey.
@jkim51184 жыл бұрын
@@BackToBackSWE Yo Ben, is the discussion section on BTB SWE still active? I've posted some questions on this video.
@patrickneff7846 Жыл бұрын
Great explanation. Very clear, thanks.
@BackToBackSWE Жыл бұрын
thanks, glad it helped! There are other codes at - backtobackswe.com/ check it out. Would love some feedback
@monjasonsteng786123 күн бұрын
Thank you - this was great!
@gaasong26153 жыл бұрын
Thank you so much for the best explanation I ever had.
@BackToBackSWE2 жыл бұрын
Amaze! do try our free mini course - backtobackswe.com/
@sameerplaynicals87902 жыл бұрын
11:20 the purple node can't be equal to y, because the insertion condition was, smaller=left, bigger or equal to=right.
@polycoder2 жыл бұрын
which program does he use for writing?
@satheshbm924 жыл бұрын
Look who's back :) Great as usual Ben
@BackToBackSWE4 жыл бұрын
hey.
@meloth012 жыл бұрын
short and precise thank you
@manojrajasekar60354 жыл бұрын
Yayy ! Welcome BACK Ben !
@BackToBackSWE4 жыл бұрын
hey.
@niklotios4 жыл бұрын
Can you please explain why you inserted the nodes the way you did in the examples about rotations? Or show me a video of the information that I am missing. Thanks a lot!!
@BackToBackSWE4 жыл бұрын
what is confusing i can explain
@niklotios4 жыл бұрын
@@BackToBackSWE no worries I just hadn't understood the insertion in a binary search tree. I learned it and have passed the exam now. Thanks a lot!!
@youareunderarrest.31734 жыл бұрын
I kind of miss him shouting near that white board. Welcome back. ✌️
@BackToBackSWE4 жыл бұрын
hey.
@_7__7163 жыл бұрын
Not clear to me how the rotation fixes the balance. Isn't it still imbalanced just on the other side of the root?
@_7__7163 жыл бұрын
At 12:46
@tmusic5913 жыл бұрын
"We have looked at binary search trees before" I deliberately clicked on the Video in the Playlist marked as #1. Which is the video that I actually should start with? Is there a sorted playlist regarding topics? I appears to me that every video sais "we did X before" and I wonder where I should actually start.
@BackToBackSWE2 жыл бұрын
You could explore the entire set of video content on DSA by getting a full fledged subscription on the Back To Back website - backtobackswe.com/pricing
@JAIGANESH-gd3qj3 жыл бұрын
please make a video on boolean parenthesization problem
@mmaranta7853 жыл бұрын
Can’t you just make the middle value the root and put the smallest one under it on the left and the largest one under it on the right?
@ahmedsidi39762 жыл бұрын
Thank you thos videos are extremely helpful ! Keep going you're the best
@BackToBackSWE2 жыл бұрын
haha! thanks. Give a shot to the free mini course on the website - backtobackswe.com/
@manhalrahman57854 жыл бұрын
Yay Back to back is back
@BackToBackSWE4 жыл бұрын
hey.
@diya97073 жыл бұрын
oh wonderful explanation, tysm !!
@programming23472 жыл бұрын
You know, I've been working with btrees for a while and Im not really sure if its necessary to strictly implement these rotations in order to get to an avl tree. Since all what you do in composed rotations is convert them into single rotation cases first to then apply that single rotation step. But what if we just add the unbalance Node to its next subtree. And repeat recursively the wrapper method to balance that new subtree. I mean if you have the case for a BTree like the next one. 2---- | ------------ 12 ----------- | | ---- 6 ---- 15 | | 5 8 *Node 2* (HeadNode) is unbalanced by a factor of 3 Couldnt we just move all the subTree of Node 12 one level up and then add the *Node 2* to that new Resulting Tree. So It would result as: ------------ 7----------- | | ---- 6---- 10 | | ---5 8 | 2 This is balanced Tree already, And now this Tree with Node 7 as the headNode would enter to the balanceTree Method again. To make sure there are no unbalanced nodes after the last change. Its the same Case when you have a Tree Like this: 2---- | 3--- | 5 You just have to take the Node 2 and insert it into the subTree with Node 3 as the HeadNode, So It will became into: --- 3 --- | | 2 5 And then we have the special rotation case: --------- 5 | 3---- | 4 This is a double rotation case, but if you just shift the subTree with Node 3 as HeadNode and insert the Node 5 into that subTree You would already have a single rotation case: 3 ---- | 4 ---- | 5 And if we repeat Sending Node 3 into the BalanceTree Method... SubTree with Node 4 as HeadNode would be already balanced once you do the insertion of Node 3 into it --- 4 --- | | 3 5 I've noticed that in the worst of the cases the new Tree is going to be unbalanced again and you can recursively submit the resulting subtrees untill all the unbalanced nodes are just single rotation cases. But usually with much less steps than implementing the double rotations. Is there any specific or algorithmic reason that makes these 2 special double rotation nodes to be the mandatory way to balance every unbalanced subtree? Or do you think the method Im using would be legit and as effective as the one with the rotations. Im not sure if Im making myself clear with this. But its a simple step to get a balanced Tree. - Just take the unbalance Node and insert it into its child SubTree. (Delegating some of the work to the InsertNode Method) Maybe its a more intuitive solution for me. It just came to my mind watching your video so I wouldn't be able to say that this method has math or algorithm well based basis. So I would be really glad if you tell me like "No dude, there's a problem with that and its..." or whatever. Thank you for your deep explanation
@Mejayy Жыл бұрын
Im literally having my data structures exam in 10 hours and this video is saving my ass
@BackToBackSWE Жыл бұрын
Hope it went amazingg 🎉 Please enjoy a special coupon from us - backtobackswe.com/checkout?plan=lifetime-legacy&discount_code=SUB 🚀
@marilu00073 жыл бұрын
I love you, you are my G.O.A.T.!!!!!!
@BackToBackSWE2 жыл бұрын
haha! thanks
@arjay_20023 жыл бұрын
Log(n) is faster than N?
@engineering-ux4 жыл бұрын
Awesome as always. Ben is Back :)
@BackToBackSWE4 жыл бұрын
hey.
@gustavoandresetticassel61382 жыл бұрын
Very nice! Thank you!
@tsatsralt91124 жыл бұрын
hi, i just purchased your platform and i think there is an issue with running a python code. I couldn't find a feedback section, so leaving a comment here
@BackToBackSWE4 жыл бұрын
We have had some testing outages and are working to make testing's uptime better. You can contact us at backtobackswe.com/contact and we can chat there if anything else goes awry
@dibaonguyentat6003 ай бұрын
Love this video
@harsh95582 жыл бұрын
Thx a lot!
@camygiuliani87582 жыл бұрын
Very clear thanks!
@BackToBackSWE2 жыл бұрын
Thank you, glad you liked it 😀 Do check out backtobackswe.com/platform/content and please recommend us to your family and friends 😀
@Mikaelsag036 ай бұрын
you didnt really explain how i can easily determine when to do a left rotation vs a right left rotation especially for bigger trees
@supamdeepbains51724 жыл бұрын
King's BACK!
@BackToBackSWE4 жыл бұрын
I am normal, a civilian
@dariusvue67144 жыл бұрын
Can you make a video about TSP?
@BackToBackSWE4 жыл бұрын
maybe
@siyiyu19164 жыл бұрын
Great work!
@BackToBackSWE4 жыл бұрын
Thx
@naveenverma23904 жыл бұрын
nice nice you are back
@BackToBackSWE4 жыл бұрын
I was always here. Just coding and working on our service most of the time. Found a gap to post something.
@yashshreeshinde43943 жыл бұрын
In this video missed you explaining on white board
@younesanteur68329 ай бұрын
Nice
@thevats3731 Жыл бұрын
you should have told general situation in which R-l rotation and L-R rotation are done
@varunrao29314 жыл бұрын
Bruh looking like Caillou. JK, good shit
@BackToBackSWE4 жыл бұрын
it's true.
@varunrao29314 жыл бұрын
@@BackToBackSWE Aside from the fact that you literally have helped me more than any other youtuber. Yeah you kinda do
@BackToBackSWE4 жыл бұрын
@@varunrao2931 great.
@eaglei25053 жыл бұрын
i have an exam about his stuff in like 3 hours. lmao. lets goo procrastination gang
@StrayDogLofi3 жыл бұрын
Hello Back To Back SWE, Can you do an analysis on Radix sort
@BackToBackSWE2 жыл бұрын
You could definitely explore the entire set of video content on DSA by getting a full subscription of B2B SWE - backtobackswe.com/pricing
@oyuncubirlii Жыл бұрын
amazing video!!!
@BackToBackSWE Жыл бұрын
Thank you, means a lot 🎉 You can also check out our free DSA course - backtobackswe.com/
@ruynobrega69184 жыл бұрын
Great video!
@ruynobrega69184 жыл бұрын
Can you tell what software are you using to write on screen?
@BackToBackSWE4 жыл бұрын
thanks
@BackToBackSWE4 жыл бұрын
GoodNotes (on an iPad)
@priyamvashi21872 жыл бұрын
Thank you
@BackToBackSWE2 жыл бұрын
Thank you, glad you liked it 😀 Do check out backtobackswe.com/platform/content and please recommend us to your family and friends 😀
@seayellow58342 жыл бұрын
I actually tried to solve self-balancing all myself, and surprisingly my idea of balancing the tree was exactly the same as rotation!
@humza48482 жыл бұрын
helpful vid dawg
@mangoofficial5273 жыл бұрын
thanks
@-NguyenBuiAnhKhoa Жыл бұрын
really appreciate mate
@BackToBackSWE Жыл бұрын
Thank you, means a lot 🎉 You can also check out our free DSA course - backtobackswe.com/
@mrbam88333 жыл бұрын
Great content! My only issue is your handwriting lol Y and X look the same lol
@shivanibambhaniya55682 жыл бұрын
you are good!
@BackToBackSWE2 жыл бұрын
Thank You!! Do check out backtobackswe.com/platform/content
@frankyan81352 жыл бұрын
thx
@mikeexplainsit Жыл бұрын
The new Khan Academy
@MiketheCoder4 жыл бұрын
420 baby!!
@BackToBackSWE4 жыл бұрын
hello friend
@MiketheCoder4 жыл бұрын
@@BackToBackSWE Btw Ben, what software/hardware do you use to write on the canvas? I'm give tutorials as well and writing pen and paper is a tiresome for me.
@Chirag-mb2yd4 жыл бұрын
I'm no geek but shouldn't we call it imbalance instead of balance, just sayin.
@BackToBackSWE4 жыл бұрын
sure
@nawendusingh28584 жыл бұрын
why i only see you in 3 months :(
@BackToBackSWE4 жыл бұрын
yo
@preeeby4 жыл бұрын
Why subscribe for one video every 3 months?
@BackToBackSWE4 жыл бұрын
We post ~2-3 videos a week on backtobackswe.com that are not here, we have an in-browser code workspace (in 4 languages right now), & it is not a subscription. It is only getting better by the day as we add features & content.
@lwinphyoaung84710 ай бұрын
👏
@BackToBackSWE9 ай бұрын
Happy Holidays 🎉 Thanks! We'd love to offer you a 40% Off our exclusive lifetime membership just use the code CHEER40 - backtobackswe.com/checkout?plan=lifetime-legacy&discount_code=CHEER40