Translator: Nawfal Aljabali Auditor: Shimaa Nabil This is a tale of two ancient cities The trees determined their fate. 3000 BC. M. The city of Warka was more densely populated than New York today. This busy metropolis had to keep expanding the irrigation system To meet the needs of a growing population. In Sri Lanka after 2,500 years, the city of Anuradhapura faced a similar problem. They were constantly multiplying too, And in the same footsteps as the city of Warka, their city relied on an accurate irrigation system. As Warka grew, its farmers began cutting down trees to make room for more crops. While the trees in Anuradhapura were sacred. Their city includes a branch of the Bodhi tree Under which the Buddha himself was said to have reached enlightenment. Religious sanctification slowed the felling of trees He even led the city to plant more trees in urban parks.
At first the Warka expansion was successful. But without the trees that filter their water sources, The irrigation system in Warka has become polluted. The evaporation of the water left mineral deposits This made the soil very salty for cultivation. On the contrary, the Anuradhapura irrigation system was designed to function In harmony with the surrounding jungle. Their city eventually grew to more than twice the population of Warka, Even today Anuradhapura still tends to a tree that was planted two thousand years ago. We might think that nature is not connected to our urban spaces. But trees have always been an essential part of successful cities. Trees act like natural sponges, absorbing rainwater Before you release it back into the atmosphere. Their root networks protect from mudslides While allowing the soil to retain water and purify toxins. Roots help prevent floods, While reducing the need for storm drainage and water treatment plants. Its porous leaves filter the air by trapping carbon and other pollutants. This makes them essential in the fight against climate change. Humanity has known the benefits of urban trees for centuries.
But trees aren't just important to city infrastructure; In fact, it plays a major role in the health of its citizens, too. In the 1870s, Manhattan had a few trees outside the island gardens. Without trees to provide shade, Buildings absorb up to nine times more solar radiation During the deadly summer heat waves. Besides the poor sanitation standards for that period, The sweltering heat made the city a breeding ground for bacteria like cholera. In modern Hong Kong, skyscrapers and underground infrastructure It made it difficult to grow trees. This contributes to dangerously poor air quality, This can cause bronchitis and reduced lung function. Trees affect our mental health, too. Research indicates that having green foliage increases attention span It reduces stress levels. It also showed hospital patients who had wall views They recover more slowly than those with tree landscapes. Fortunately, many cities are full of sights like these; This is not an accident. As early as the nineteenth century, City planners are beginning to realize the importance of trees. In 1733, Colonel James Oglethorpe planned the city of Savannah, Georgia To ensure that no neighborhood is more than a 2-minute walk from a park.
After World War II, Copenhagen directed all new developments along five arteries – Each of them is located between two parks. This design increased the resilience of the city Against pollution and natural disasters. And urban trees don't just benefit people. Portland Forest Park preserves the area's natural biodiversity. Which makes the city home to many local plants, And 112 species of birds and 62 species of mammals. No city is more tree-preserved than Singapore. Since 1967, the Singapore government has planted more than 1.2 million trees. Including trees 50 meters high which are called super trees. These structures supply themselves and adjacent buildings With solar energy and collected rainwater. Trees and plants currently cover more than 50% of Singapore's land area. This reduces the need for air conditioning Low-pollution transport is encouraged. By 2050, it is estimated that more than 65% of the world's population will live in cities. City planners can develop an environmentally friendly system, But the ball is in the court of the people who live in these urban jungles To make them homes for more than humans.
Translator: rami durbas verified: omar idmassaoud With a height of about 84 meters, This is the largest known living tree on the planet. It's called General Sherman, These giant sequoias have sequestered approximately 1,400 tons of carbon in the atmosphere Over its estimated life of 2,500 years on Earth. Few trees can compete with this carbon effect. Today, however, humanity produces more than 1,400 tons of carbon every minute. To combat climate change, We need to sharply reduce fossil fuel emissions And drawing in the excess carbon dioxide to restore the balance of our atmosphere Of greenhouse gases.
But what can trees do to help this struggle? And how do you sequester carbon in the first place? Like all plants, trees consume atmospheric carbon Through a chemical reaction called photosynthesis. This process uses energy from sunlight To convert water and carbon dioxide into oxygen And carbohydrates that store energy. Then the plants consume these carbohydrates in the opposite process It's called the breathing process, which turns it into energy It releases carbon back into the atmosphere. However, in trees, a large part of this carbon is not released. Instead, it's stocked in a new wood texture. During their lifetime, the trees act as carbon reservoirs And it keeps pulling in carbon as long as it grows. But when the tree dies and decays, Some of the carbon will be released back into the atmosphere. A large amount of carbon dioxide is stored in the soil.
Where it can survive for thousands of years. But eventually, that carbon will also leak back into the atmosphere. So if the trees will help combat a long-standing problem Like climate change, It needs to survive to sequester that carbon For as long as possible and at the same time to multiply quickly. Is there one type of tree that we can plant that meets these criteria? Some species are fast-growing, long-lived, and super insulated Can we spread it all over the world? Not to our knowledge? But if such trees exist, It will not be a good long-term solution. Forests are complex networks of living things. There is no single species that can thrive in every ecosystem. The trees that are most sustainable when planted are always native trees; Types have already played a role in their native environment. Initial research shows that ecosystems Those with a natural variety of trees have less competition Resource and better resistance to climate change. This means we can't just grow plants to pull carbon; We need to restore depleted ecosystems. There are many areas that have been cut short Or develop it and it is time to retrieve it.
In 2019, a study led by Crowther Zurich Laboratory It analyzed satellite images of tree cover located in the world. By combining these images with climate and soil data. By excluding areas essential for human use, They concluded that Earth could support About one billion hectares of additional forest. It is approximately 1.2 trillion trees. This stunned number surprised the scientific community, Which prompted more research. Scientists are now citing more conservatively but still noticeable. According to their revised estimates, these ecosystems can be restored Capture 100 to 200 billion tons of carbon, That's more than a sixth of human carbon emissions. More than half of the potential forest canopy As for the new restoration effort, it can only be found in 6 countries. The study can also provide an insight into current restoration projects.
Like the Bonn Challenge, It aims to restore 350 million hectares of forest by 2030. But here is where it gets complicated. Ecosystems are incredibly complex. It is unclear whether it would be better to restore them with human intervention. It could be the right thing to do in certain areas It is simply to leave her alone. Additionally, some researchers are concerned about forest restoration On this scale it may lead to unintended consequences. Such as the production of natural biochemicals At a pace that could actually accelerate climate change. Even if we manage to regain these areas, Future generations will need to protect it Of the natural and economic forces that previously depleted it. Collectively, these challenges weaken confidence In restoration projects around the world. And complexity in the process of rebuilding ecosystems It shows how important protecting our current forests is.
But we hope to recover some of these depleted areas It will give us the information and condemnation necessary to combat climate change On a larger scale. If we get it right, these modern trees may have time to grow Into carbon-bearing giants..
– Hey it's me, Destin. Welcome back to Smarter Every Day. There's a really cool thing happening on the internet right now
and we want you to be a part. It's called Team Trees
and the goal is simple. 20 million trees by 2020 and we actually have a
mechanism to do this. If you go to teamtrees.org the Arbor Day Foundation has agreed to plant one tree in the ground for every dollar that's donated there. That is a huge opportunity and internet content
creators from all over, every genre of content,
were all working together to do this but we need you. We need you to help us do this by going to teamtrees.org and donating. Let's say that we're all on
board and we're all awesome and we make this happen. $20 million go to the Arbor Day Foundation and they're gonna plant 20 million trees. How do we do that scientifically? In order to figure this out, I wanna go look at this whole concept through the eyes of my granddaddy who attempted to plant hundreds of trees in a field back in the 60s.
My dad was there and he
remembers exactly what happened. (beep) – Early 60s, '61, '62, Daddy
had a group of students from Auburn come and
plant some longleaf pines. They planted them in different methods, some in a hill, some in a
furrow, hundreds of them. And only two of them lived. – Why did Auburn University come here to plant trees in this field? – It's not native to this
area and Auburn wanted to see if a longleaf pine could
survive this far north. – [Destin Voiceover] The fact that longleaf pines were planted
here is super interesting because Granddaddy's land was just north of the natural range for that species. Whenever I travel to different
regions of the world, I love to discover what
tree species thrive in that environment, whether
it be a strangler fig in Peru, a baobab tree in western Africa, or the famous Recoleta rubber tree in Buenos Aires, Argentina.
Certain species of trees always seem to thrive in certain areas. To learn more about why certain thrive in certain environments, I went to Auburn University School of Forestry and Wildlife Sciences where I met with Dr. Becky
Barlow and Dr. John Kush. Both are experts in sustainable forestry and both know a ton
about the longleaf pine. – [Destin] How does a
person find the right tree for the right location? Let's say someone lives
in Ohio for example, or they live in, I don't know, Wyoming and they need to figure out the exact tree they need to plant on their property. – The first thing that they need to do is, like Dr. Kush was saying, you need to think about the soils. You need to think about
what soils you have. You need to think about
what you are willing to do from a management standpoint.
How active are you willing to be in the management of your property? Some people are just, wanna
plant it and walk away and not have to do anything to it. And that's okay too and
there are certain things you can do from that standpoint. But most of the time, you're
gonna have to plant it. Then you're gonna have to monitor it and you're gonna have to
maybe do some thinnings in there to make sure that the trees have enough
water, light, nutrients to grow, because they
start to get too crowded and then they're gonna
start to die naturally. And so you wanna thin it so you don't have that natural mortality. You can actually capture that mortality. – [Destin] So there's science to it. – Yeah, a lot. And you also need to know about the trees. You need to think about the
tree that you want to plant and think about its life history, its silvics is what it's called. – [Destin] How do you spell that? – S-I-L-V-I-C-S. It's kind of its life history. Where does it normally occur? Where does it naturally occur? How does it grow? How tall does it get? Does it need a lot of sunlight
or can it tolerate shade? It's those things like that
that you need to understand about the trees that
you're wanting to plant and then making sure you, again, that's how you match
the tree to your site.
– [Destin Voiceover] Dr.
Kush pulled up a soil survey from Granddaddy's land and explained that the
different types of soil affect how trees grow differently. He said the main factor,
however, was probably that Granddaddy planted
them in a grassy area where the weeds probably
choked out the trees. – [Destin] So longleaf pine. – Longleaf pine. – [Destin] What do I need to know? – Burn it. (Destin laughs) – What? – Burn it.
– [Destin] What do you mean? – Plant it, burn it. – [Destin] What do you mean? – You gotta use prescribed fire, get your little area cleaned out, get your trees planted,
wait a year, burn it. – [Destin] So you're talking
about the undergrowth. – The undergrowth. – [Destin] Okay so you're not saying, "Cut the tree down and burn it." – No, don't cut the tree down. Please don't cut the tree. We're doing too much of that already. – [Destin] Okay so fires
can be a good thing if they're done correctly,
is what you're saying. – Fires are a excellent
thing if done correctly. But we have to do it correctly. – [Destin] What do you mean? – You have to prescribe,
get your conditions right, prescribe the fire, get a burn permit from the Forestry Commission
and do what's right for nature. You're just mimicking what nature did. If we weren't here it would be happening. If you have nobody here,
get away all the people, all the roads, and you just
have wildlife out there, a lightning strike hits
a tree, starts a fire.
It'd go for miles, tens of
miles, hundreds of miles. So the southeast was
seeing fire very frequent and thus you had longleaf pine there. – [Destin Voiceover]
Dr. Kush explained to me that the longleaf pine is different. He explained that it
has adapted the ability to actually be burned during
its first few years of life. Dr. Barlow and Dr. Kush took me outside to see actual longleaf pines
and explain how they work. – We actually have a longleaf
pine in the grass stage here. – [Dr. Kush] I planted
this four years ago. The idea of trying to bring
longleaf pine back to this site.
It passed the stage where it doesn't really put
out any woody extension growth like all trees do. It waits for its chance to
take fires for a couple years and then that central bud,
it will one day decide that it's time to come
out of the grass stage and off it will go. – [Destin] Really? That is not,
– What that– – [Destin] That is not what I think of when I think of a small tree. – It is not. Any longleaf pine this size can take fire. Any other tree will die. – [Destin] So that's
why it exists like this. – That's why it exists like this. And then when it comes
out of that grass stage, it'll put on four or five
feet of growth in that year, get its quote unquote head above the fire, and it just hangs out for the next three, four hundred years.
– [Destin] So this is just a
completely different strategy for survival?
– Absolutely. Unique in the world. – [Destin Voiceover]
When the longleaf pine is in the grass stage, it's busy
making a very deep taproot, which also means it's drought resistant. Check out the comparison
of this loblolly pine and this longleaf pine. – This is only two years old
and that's four years old.
– [Destin] We're in 35 days of drought. Did this die recently? – Yeah this probably just happened within the last three or four days. – [Destin] Oh really?
– Yeah. – [Destin] So we've got
some real data here. – This is real data. This is actual. – [Destin] Loblolly pine
died because of the drought. The longleaf pine is just kicking it. – He's just hanging out saying, "I'm not quite ready to come
out of the grass stage." What that trigger's gonna
be, nobody knows but– – [Destin] At some point
its gonna figure it out. – My guess just based on the size now, it's gonna come out next year. – [Destin Voiceover]
Odd as it might sound, talking to Dr. Kush and
Dr. Barlow taught me that one of the reasons
Granddaddy's trees might have died would've been lack of fire. Four days after visiting
Auburn University, I'm driving across northern Florida. Trees on the left side of
the road are tall and healthy but they have burned trunks.
Trees on the right side
of the road are crowded and they look like scrub brush. It all clicked when I saw this sign. – I could not have
planned this if I tried. Turns out, there's a place down here called the E.O. Wilson Biophilia Center. They're all about the longleaf pine and I have to show you what I learned.
These people are awesome. This is Ashlyn.
(Ashlyn laughs) I just found this place. And I'm seeing that right there, which leads me to believe that
you guys believe in burning to promote longleaf pine
health, is that right? – Very controlled burning. – [Destin] Controlled burning.
(Ashlyn laughs) But the whole idea is to get the fuel at the bottom of the ecosystem to take out all the scrub brush right? – Exactly, yes. – [Destin] Cool and you said
there's somebody I can talk to? – Yeah definitely, we'll find Bob. – 'Kay we're gonna go see Turtle Bob who knows about burning longleaf pines. – Hi.
– [Destin] Nice to meet you. So you know about burning longleaf pines? – Well, we've burned a few. (laughter) – [Ashlyn] Planted a few as well. – Fire is important to keep the longleaf pine ecosystem alive because to start with, it
requires bare mineral soil to start germinating. And then what it does
is it opens it up enough for gopher tortoises to survive. Gopher tortoises have
to have an open habitat. – [Ashlyn] This is a gopher tortoise. – [Destin] And these are the turtles, or they're not turtles, they're tortoises, that make the burrows right?
– [Destin] And they make the burrows as a result of the longleaf pine? – They do make it in
that nice open sandy soil that can be found in the
longleaf pine ecosystem. And they dig those burrows
really far into the ground and it's not only important for them, but they are a keystone species because they're gonna dig those burrows which can house up to
200 or 350 other species, especially during those fires. – [Destin] She's waving. – Those animals need places to go. Really good place to do that is gonna be a big hole in the ground. – [Destin Voiceover] Ashlyn
took me out into the forest and showed me several young longleaf pines in the grass stage and
then the secondary stage known as the bottle brush phase, which then leads to the sapling phase and finally the mature trees. Ashlyn took me out further into the forest to show me the holes that
the gopher tortoises dig and this is where it all came together.
Because this tree can survive fire, the underbrush gets cleared away which paves way for this turtle to gain access to the forest floor where it can dig these holes. As Burning Bob explained, these holes support
hundreds of other species that're then able to
live on the forest floor, which creates an ecosystem which can sustain even
larger umbrella species such as the black bear. So it isn't about a single tree, it's about an entire ecosystem. An ecosystem which takes advantage of one particular tree's
ability to survive fire. – [Destin] So this is what
the natural forest looks like? – Yes, if we didn't burn
it, lightning would. And then it would eventually
have this nice open clear area. Lots of room for the wildlife to live in compared to this side.
– [Destin] But this side. (Destin laughs) – Lots of different kinds of trees. We've got some slash pines,
we've got some oak trees, yaupon hollies, taking
over, kind of crowding out some of those other pine trees
that would typically be here.
And then there's a ton
of leafler on the ground. We actually call that
pine straw our fuel load. If lightning were to strike that right now it would burn entirely
too hot entirely too quick and would definitely turn into a wildfire which would be very bad. – So if I were to decide to plant a tree, what would you tell me? What do I need to know? – I would say plant a longleaf if you live in an area
that'll sustain a longleaf. You're gonna need to
be upland, not too wet. Definitely stick to the native plants. – So look at the local
environment and the ecosystem and identify the silvics
of the trees in your area and figure out what trees will grow there and then pick something
like that, you'd say? – Yeah, something that's a lot of different animals are gonna use. – Okay, so think about
the whole ecosystem. Don't just think about the one tree.
– Yeah, it doesn't have to look pretty but it has a job. (laughter) – teamtrees.org that's the whole
point of this entire video. We've partnered with
the Arbor Day Foundation because they are the experts. They understand the silvics, they know exactly what tree
to plant in what location, and the goal is simple. We want to raise $20 million
for 20 million trees by 2020. And to do that we're gonna need your help. And I would encourage you to
consider going to teamtrees.org and donating or right
here on the YouTube page, there's a donate button below. If you use that, YouTube's gonna pay for the transaction fees.
This is a huge thing that
we're all doing together. It is rare to have the opportunity to plant one tree for one dollar so I'm gonna take advantage of that. I don't know if you've
ever planted a tree. It's kind of expensive to
go buy an individual tree and put it in the ground
but at this kind of scale you can literally plant a thousand trees for a thousand dollars or a hundred trees for a hundred dollars or 10 trees for 10 dollars.
Your money goes a really long
way to help the environment. So if you're interested in
doing that, teamtrees.org or click the button below
to donate here on YouTube. In fact, the sponsor for
this video, Hello Fresh, they've agreed to donate
$5000 to plant 5000 trees. (beep) This episode of Smarter Every Day and my donation to teamtrees.org
is sponsored by Hello Fresh and you're gonna help today, Dad? – I'm gonna try. – [Destin] I don't ever think
you've cooked in front of me. Maybe–
– Hot dogs and eggs is all I know. – [Destin] All right okay, there we go. Today we're gonna do
pineapple poblano beef tacos and we're gonna cook for Mom. You think we can do this? You've assemble spacecraft. – I have. – [Destin] We can do this. Got our meats, got our ingredients. Let's get to chopping. Hello Fresh is a home
meal kit delivery system that sends you fresh
ingredients to your house. You can cook it, it's really simple. Just follow the instructions and you can make a delicious
meal for your family.
– Poblano. – [Destin Voiceover] If you
want to make Hello Fresh at your house, you can get
it by going to hellofresh.com and using the promo code
smarter80 at checkout. That gets you 80 bucks off the
first month of Hello Fresh, which is like eight free meals. That is a lot of food
and a lot of savings. – Drizzle? Oh. – [Destin] Oh?
– Oh? (laughter) – [Destin] You're the one I got it from. (Darryl laughs) Hello Fresh is now from $5.66 per serving so you can feed your family delicious food at an affordable price. All right, moment of truth. What do you think? – It's good. – Big thanks to Hello
Fresh for sponsoring this.
Big portion of this sponsorship
is gonna go towards trees at teamtrees.org (beep) Please consider going to teamtrees.org and joining Team Trees. Also go check out all these other videos these other creators are making. We're all in this together. We are trying to do this
huge movement together and we need you on Team Trees. So that's it! I'm Destin, you're
getting smarter every day. Have a good one. Bye..
what's good everybody its Asia here again and in this video I want to a cut I want to go over to three trees and deletion which I consider a pretty complicated task and in this tutorial I'm going to show you videos which cover you know the practices and visualizations of what to do and then at the end I'm going to go through hard core examples so as you see in this two three tree example I have up here I have not I have letters and I'll explain what the letters mean into individually in a second but first if you do not understand to three trees I encourage you to watch my to three trees insertion video or my two three three four trees video which I also have in the data structures playlist so as you can see I have this two three tree here and I have letters P stands for parent s stands for smaller and L stands for larger now of course that s s is larger than L and that's all we care about but this whole node is entirely less than P and D is the node we are going to delete here so what we do in deletion really is you want to try you're going to switch the parent node if there is one if the node you're deleting has a parent you're going to switch it with the parent and then simply delete it and what comes of that is kind of is the way you redistribute so what I'm going to do here is I'm going to switch the parent and the deletion node because what I want to do is even though this seems like a really easy tool eat where I can just delete this node hey why don't want to delete this node it's the tree has a can be unbalanced and what I want to do is I want to rebalance the tree here to make sure it's always balanced and what I want to do is kind of make it like this at the end so you know it has it still has both leaves the parent still has both leaves off it or spoke children so what I want to do here is now I'm going to switch P with D right here and now what I'm going to do is I'm going to delete D or can delete i'm going to delete the value in d and then i'm going to bring up this l right here so what by doing that what I'm going to do is I am swapping this element the node that I'm on that I might be to delete with the in order successor and if you don't remember what in order in order is you can look at my tutorial in our in order traversal but it's essentially the going left and then the item or the element and then trying to go right from the parent so if I went left if I want left here I couldn't go left anymore so I hit this L and that would be my next in order accessor so what I can do here is I can bring up this L and as you can see here then I have that little image I showed you before well I've got the I've kind of got a more perfect tree where I've got L is now my new parent asses to the left and P is to the right which is great because I did know and then this does make sense because remember how I had SNL here in the beginning and since it was to the right of P I know that P is bigger than L so it is satisfactory by the rules that P can still be to the right of L so that is a simple deletion that is known as the remove redistribute deletion and the next deletion we're going to be working on is the remove redistribute solution actually this is another example of the remove redistribute example that I showed you guys up here it's just a little bit more complicated so d again is the node we want to delete and then I've got parent smaller and parent larger so again what I'm going to do is I'm going to delete is I'm going to swap the nodes with I'm going to swap D with its parent with the closest parent which is PS so I'm going to have PS and D and so then I'm going to do the inorder successor so it's it's on left element right where I can't go left because that's where I'm good that swear the note I'm deleting from so that's why I'm switching from so instead I'm going to go right and the next element in succession is SL so what I'm going to do here is I'm going to move our deletion and then I'm going to delete SL I'm going to sorry not SL just the s I'm going to bring up the s here and then when I bring up s here that's going to make everything nice and cozy so then I just have one note here of an L and now the tree is perfect again I didn't delete any child's or nodes or parents anything and I successfully deleted that node D now on to the next things okay here's another example a tad bit more complicated and one more step involved so again I want to delete the node D so what I'm going to do is I'm simply going to swap D with its closest payment which is the parent of these smaller PS s we like to go on PS wood D and then what I'm going to do is I'm going to delete D and bring up its inorder successor ex and I'm going to put it right where the D was so I'm going to swap those out but now as you can see there's nothing there and I don't to leave the ex there because there's a duplicate node so what I'm going to do here this is the extra step that I'm talking about or the more straightforward example is I've got to bring down this PL to make sure that there's still that I don't remove this child node and that it still satisfies the acquirement so I'm going to get I'm going to put the pl in this node and now I need I first three children I need two elements to satis to be able to have different sets and different paths to go so what I need to do is I need to bring up this s or the next in order element so I'm bringing up that s because I still need an element to fit all the requirements and I'm bringing up that s and then this was that L that was bigger than that s and as you can see this still fits the requirements because in the beginning the X was between was was less than PL and greater than PS which it still is and then in the beginning s was greater than PL but less than larger which still fits the requirements so that's a way to properly we'll move another out kind of again a more complicated example okay guys here's another exam now this look may look very similar to the other ones but let me trust you you actually do a different oil move this is known as the remove and merge method so again I'm going to delete D I'm going to swap it with its closest parent which is s and so I'm going to have s here and I'm going to have D here once I've swapped them I can finally remove it so once I do that I have successfully removed D but now what I do but now what I've got here is I've got an L and a and a B and I can't like if I moved all these over so if I move the a over here but the L down and bought the B up I would I would have an empty node here which is not what I want so that's not what I want to do what I actually want to do is let me put this all back when I've got the B and I've got the L here all I want to do is I want to simply merge these two nodes together I want to merge s and a together so that everything is satisfactory yet again so that's why this is called the remove and merge method so then I've got s and a and L only has two children would still satisfies the rules so that is the remove and merge that is one at one remove and merge merge example okay everybody now we're going to do another example in this example I've got again my basic parent nodes but essentially the s and L and D this time are not Leafs just imagine they have other trees they have other elements below them and that you have to consider reorganizing those paths or those branches when you delete a node so again I'm going to delete D and what I want to do again is switch P with D again I'm going to do P I'm going to leet P now I'm going to switch them over now and then I'm going to delete D and I'm going to bring up L now as you see here what's going to happen is I'm going to bring up L here and since I brought up L now this becomes s becomes a one node or has one element in so it doesn't have support it cannot support this branch or um this this branch of elements the T 3 branch because or every element you can for every element you have in each node you can have n for every n elements you have an eternal you can have n plus 1 branches so what I need to do is I need to take this T 3 over here and attach it to its sibling and make an eye sense and make tea for right here and put it over here with T 3 and that way it still fits the requirements and that everything is solidified because T 3 was the biggest tree here and we know everything in T 3 is going to be bigger than s but less than P so that's why it's still ok that it goes there and we know and it's okay that D extends to T 4 because beforehand it didn't it beforehand it was the D it was bigger but since we switched with the parent we still know it's greater than we still know it's greater than the parent because the parent used to be a P remember and we got rid of that deleted note another simple case is let's say for instance this is the root node in my other examples the this is this is my top node was not the woot node it was a case that it was a child of something but if you have a woot node and that's all you want to delete and let's say I've got trees or I've got roots below of a B and C to delete the root node is actually really simple all you do is you delete the road the root node you don't need to refactor anything or do anything else and then this is the new root is this SP right here so that's really cool and probably the easiest one to remember okay guys now time for an actual example in this example you're going to be deleting 65 the node I'm we drawing down there and for 65 what we're going to do here is we're going to first we gotta find 65 so we're going to find 65 and then we are going to remove its closest parent once in this case could be 70 or 90 I'm going to choose 90 it doesn't matter which one you will move so what I'm going to do is now I'm going to swap them so I'm going to do I'm going to now make 65 into this D node now I'm going to do it with 70 and what I do what I'm going to do here is I'm going to actually delete is I'm going to actually delete 70 I would delete the Dino Dileep the 65 d I just made and what I'm going to do here is now since there was a void here I'm going to have to move up the 70 node because I need to fill the void so then I move up to 70 node and this just becomes a 1 node of 80 so pretty easy example the next thing I'm going to do is I'm going to delete the 70 as you see so when I now I'm going to delete 70 and in 70 what I want to do is I want to find 70 again this right here and what I want to do is I want to find the next inorder successor which is going to be 80 and then with 80 what I want to do is I want to swap them so ice I want to swap 70 and 80 80 and 70 and since I've done that I can now safely delete 70 but it does that does something that I do not want and what that does is it leaves a blank element in our tree and we don't want that so what I want to do here is since I have this blank 70 is I want to there's two things on I can either do this about two ways I have to bring down an element of 80 or 90 and then merge those two nodes with the with the next one in sequence to it so it makes sense so for instance I could move get pull down 80 and then make this node into a 80 60 node make this into two elements oops make this into a 60 80 node and attach it or I could bring down 90 and make this into a 90 100 node and then it and then done put it on the right side and for my sequence for my niceness I will do a 80 60 node and that allows me to delete this 80 and make the tree format it again as you can see let me draw a nice and bubble because I already know I'm pretty bad at doing this and I need one line here going oh man so there you go then I just have my 90 and there you go boom and we've successfully deleted 70 next up I'm going to delete 100 and simply all I do is I find 100 and then I know that's going to be my new deletion node so I like to put it look nice and D around it and I'm going to swap it with a parent so I'm going to swap 90 and D because that is almost what I always need to do I'm going to swap 9 D and D and I now I can't just delete this node obviously because I can't just delete this node so what I'm going to do is I'm going to bring up the next in order successor with H with on multiple elements which is going to be 80 and so I'm going to bring up 80 here and I'm going to put 80 right down here and that's how I'm going to delete 100 to satisfy all the requirements and 60 is going to go back this node is going to go back to having one element in it okay so now I'm going to delete 80 which is actually going to get pretty hairy so again I'm going to find 80 I just write it here things get pretty here when you decide to relate a parent so I'm going to delete 80 and I'm going to put a D there and then I'm going to swap it with the inorder successor which will be 90 or it could be 60 but that's okay we will do I need to stay so I'm going to put 80 right I'm going to put 80 right here and basically what I'm going to do here now is sorry I'm going to put in d node here and I'm going to swap it with 90 so then I could successfully delete the D node or 80 but I can't redistribute that so I need to merge the nodes so simply what I do here is I put the elements together and what we get here is kind of a weird example and probably the hardest thing to do in the tree so I'm going to have to I'm going to move that denote up and I'm going to put down 60 and 90 because I couldn't redistribute the note I can't redistribute them so I merged the 60 and 90 but I can't do anything else and this is an invalid tree so I have to recursively go up the tree here and basically what I do is I start looking upwards I start looking at this 50 here and then I see would like do to redistribute or merge the notes here so I see this 50 and I say hmm what can I do with this 52 possibly um get rid of this denote and make actually make a tree structure so 60 and 90 could live together because as far as I know 60 was 80 so obviously 60 and 90 need to be on a different par so what I can do here is I see that I can put I could merge 30 and 50 and make and make a 3 branch node that simply brings them all together so was that 40 yes it was 40 and now as you can see here I have reclassified this tree here with this node and now I can successfully get rid of the D here and just draw one line from the 60 or 93 and as you can see that actually works out because 60 90 is greater than 50 40 s between 30 and 50 and 10 and 12 is less than those two so as you can see the leading and E is pretty different and now we have a new root of 30 and 50 instead of just the 50 node that is something to remember so getting 50 50 deleting things like that can be very complicated because you may need to redistribute everything and you may get an invalid tree at one point so there you go those are the basic examples and pretty complicated steps of removing in a tree if you have any more questions you can feel free to comment and ask me but also I'm going to include a link in the description below if you want to look at anything and a really great PowerPoint that explains how to do any trees work it's something I went to study up on this tutorial but I hope you guys have a great day um visit my Facebook and Twitter I hope to tweet more and give me any suggestions if you like if you don't like my handwriting will you own any extra software I could use or just anything the great thing about the Internet is interaction I hope you guys have a goochy goochy day