 So in the previous video we were talking about doing a simple rotation with any tree that turned out to be imbalanced. What happens, however, you may have noticed that both times my parent and even my grandparent were actually sort of parallel. Say, for example, in the last video we were talking right rotation and I made an insertion of an 8 here. Well, let's say for example that this happened to be the 8 and instead of, there we go, let's say this happened to be the 8 and I went in and I made an insert 7. So again I would come in and I would insert that 7 and just like we've done each time I would then assess is my balance factor still okay. One of my balance factor here is a 0 because I have no children. I check my depth. I have a leftward side. So I'm at a 0 minus 1 or negative 1 balance factor. That 0 is coming from the fact that I don't have a right child. So it's just kind of non-existent. And then I would make the assessment again with my 6. Just like I said with my 8, I also have some non-existent child here. Now this is where things get interesting because I would see that I have my left being a 0. However when I would make my subtraction I don't just go straight down one way. So I'm not just going down my right children but I would go one node and then two nodes. I have a maximum depth of going two more nodes. So I'd see that 6 is a balance factor of 2. It's heavy. So where is this starting to originate? Well my issue actually is coming in the fact that I can't just do a left rotation. You see if I were, if I were to take sort of that child, that heavier side, and make the rotation, I wouldn't exactly fix this entire problem. So let's actually kind of see this in action. So again I would come in and that x has a parent y and I have some subtrees going on with them. A t1, a t2, a t3. And to make my, in this case, left rotation, I'd see that the y and the x would come into play. Same as before. And y would inherit that t2 while x still retains its t3. So again I make that same rotation we were just talking about. So I make my rotation 5, 2, again they're unfazed. I would give the 8 to be the parent. That left child is still the 6. Take a look at what we're still saying here. 6 gets a non-existent child, it gets a 7, and then my 8 gets a non-existent child. So if we were to once again make the calculation just to kind of see this again, you'd notice that my balance factor here, it's a 0, it's a 1, I'd still have a 2 going on right here. So we've found ourselves in a slight issue where what I have to do is what we would classify as a double rotation. Because I can't just do a rotation off of here. Instead I find that this category requires me to do something we like to call a trinode restructuring.