 So in the past video, we talked about how doing a simple left rotation might not fix our problem. So in this case, we saw that we had inserted a 7, so when we came in and did a normal just left rotation, I was left with a 2, a 5, an 8 again because that's the heavier side of things, a 6 and a 7. So I didn't actually solve the problem at all. And so what we introduced was this idea of what we would do as a double rotation. Now I also mentioned a term that we call a, and I'll give it a new color, trinode restructuring. So what actually happens is we start to look at those non-existent nodes or those subtrees again that we were just talking about. I actually look a little further. I see that I have sort of this issue of three nodes that are in plane out. And so what I'm going to do is I'm going to call this one's now my y, this one's going to become my x, and this one's going to become my z. So that heavier node, it is still sort of where we go with our trinode restructuring, and we still handle our x. We'll classify that sort of as our children, our first child, and then we have our z. So z being our grandparent. Now like I was saying, every single one of these nodes, if we were to map this out over here, every single one of these nodes has the potential for another subtree. So y happens to have a spot, z happens to have a spot, and x happens to have two children available to it as well. This is where things get a little different, but that's also why we do a double rotation. Now I'm going to map these out as t1, t2, t3, and t4. So what's going to happen here is I need to look at where they all line up. So in this example for our sake, we would classify this as how these line up in order. Remember in order means that I look at whatever my left child is first, then I get to look at myself, then I look at my right children. So in our case, we would look at this and we actually do a few letter changes. I'm going to make sure to kind of label them with separate letters as well. So I have an a, a b, and a c. These are for my trinode restructuring. So the first thing I need to do is I need to find out which one of these nodes is going to be a, which one's going to be b, which one's going to be c. Now like I just said, I have an in-order presentation that I need to find out first. And in order again is, I'll use a different color, it's left child, self, right child. And that's exactly what we're going to want to look for when we're dealing with what's a, what's b, and c. So I only have three options, x, y, and z. I need to figure out sort of when each one will get accessed, which one is going to happen first. Now in this case, as we said, the left child is going to happen before I get to myself. And so if I'm sitting at six, you know, just arbitrarily, if I, or I was sitting at five, I would access the two, then the five, then the six. That same principle is coming down here. I would access what are my left child is first. I don't have one, so that's fine with me, but then I noticed that I would access my six before going to my right. So what that means is z is going to be my a. Then I get my b. My b is saying, again, it's the next one in sort of my in order reading. Now, you would say, oh, it's going to be eighth because z, y, they're connected in some way, it's the next one, they're chained together, but not in reality. Remember, if we're looking at the idea of the in order operation left, then myself, then my right child. So I visited z, which means that I get to move to my right child here, but I don't just immediately access, you know, access y. I have to first access my left child. Again, that's in order. So in reality, x is going to become the b in this situation. And then finally, as you know, rules of removal kind of come into play, then I get to remove, I get to access myself. Since y is the only available node left, it becomes my c. So why is this important? So now that I've created this a, b, and c, what I can do is I can take this structure right here and I can make b my parent node with a and c being the children nodes. So what happens to my t1, my t2, my t3, and my t4? Well, the same principles are going to come into play. I know that t1, for example, has to be less than z. And if we kind of see, we see that z happens to be my left child. So I give z, or a, t1. But what about the right child? You can already imagine I have four of these to give. So where does, say, t2 go? Well, if we kind of take a look, in that kind of chain, we see that t2 happens to be less than x, less than y, but greater than z. Alright, well, if we happen to be following along, this is our x, this is our y, this is our z, well, I said that it's greater than z, greater than z, and still less than x. So less than x, less than x, but greater, but greater than z. So it gets to become t2. And so the same principle can come into play with our t3 and t4. t3 happens to be greater than x, but less than y, and t4 happens to be greater than y. So our y will get t3 and t4.