 So one of the things we need to look at is we want to make sort of a removal of a node from our tree. Let's say, for example, our five. It's really relatively simple because it has no children of its own. So what we basically are starting to ask is if node has zero children. In this case, we can just simply remove it from the tree. There's no extra changes that need to be made. We don't need to do any readjusting. We can simply get rid of it as such. So we strip it out. Now in this regard, we'd also come in and say something like node.parent equals null. And we could also find out if it was the left or right child of that parent and then set that parent's, in this case, left.node as well. So parent.left equals null as well. Again, if it was 13 instead, we could do a right. But actually let's kind of take a look at that 10. What if, in this case, I came in and said something like remove 10. Now in this case, we have a child. So we can't do the same thing. And so if that node has one child, that's a terrible one. Let's fix that up. If that node has one child, we're going to actually take whatever that node is. I'll call it w. And we are going to set w to where that node was. So replace node with child, in our case, w. So that's what we would do. We would then replace w, remove, say, w. Same sort of way we did here with our zero child. We'd come in, we'd strip it out. And then we would set this equal to now 13. So the last one we have to do, our last kind of example would be, let's say, something like remove 15. Now there's actually two different ways and depending on the implementation we're looking at, I would either want to look for sort of my in-order predecessor or my in-order successor. Whichever one happens to be, you'll find different algorithms that ask for both of them. Wikipedia, for example, uses the predecessor version or I could use the in-order successor. Let's say, for example, I went with the predecessor for this sort of green instance, predecessor. In this case, what we would do is we would actually go through and do the same principle. In fact, let me change this to 75 just because this one's already kind of being taken care of. You see, 75's got a lot of numbers going on. So I can't just immediately strip it out. I don't want to do 65 also. I couldn't, say, turn that into a 65 because 70 is greater than 60. And so we'd be breaking the rules of how a binary search tree should look. Everything on the left is lesser. Everything on the right is greater. So if I wanted to go with the predecessor removal process, in this case, I would want to find sort of my, I would call it the greatest lesser, greatest lesser. And that's the node that I would make the replacement with. So in my case, I have a 75. 65 is not my greatest lesser. It would actually be the 70. And so I would make sort of that replacement. So if node has two children, replace with greatest lesser or greatest predecessor. That's not the only implementation of the removal process. We do also have a version where I look for my in order successor. What's the next node I would do if I was traversing in order? And I've just visited 75. What would be the next one? Well, I'd come down since 85 has children. Again, I can't put 85 here because 80 is less than 85. It would be the exact same principle. So this time we'll do a remove on 75 using the successor model, successor. And so we're looking for the least, least greatest. Again, in that sake, since we're looking at the subtree of 75, we see I've got three nodes. What's the greatest over the least greatest? In that case, it's the 80. And we would replace with the 80. So both sort of work and you'll actually see implementations of both of them. There's no real difference. You see a few times that people will argue what if there's nothing over here on the left hand side, but I would argue that that's the same if you were to say it on the right side. What if the right only had one child as well? Both of them work in our case.