<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>build binary search tree Archives - NeuralLantern.com</title>
	<atom:link href="https://www.NeuralLantern.com/tag/build-binary-search-tree/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.NeuralLantern.com/tag/build-binary-search-tree/</link>
	<description></description>
	<lastBuildDate>Sun, 12 Apr 2026 05:12:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.NeuralLantern.com/wp-content/uploads/2025/04/cropped-2025-04-04-Lantern-03-32x32.png</url>
	<title>build binary search tree Archives - NeuralLantern.com</title>
	<link>https://www.NeuralLantern.com/tag/build-binary-search-tree/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Building a Binary Search Tree &#8211; Insertion Tutorial</title>
		<link>https://www.NeuralLantern.com/building-a-binary-search-tree-insertion-tutorial/</link>
					<comments>https://www.NeuralLantern.com/building-a-binary-search-tree-insertion-tutorial/#respond</comments>
		
		<dc:creator><![CDATA[mike]]></dc:creator>
		<pubDate>Sun, 12 Apr 2026 05:12:30 +0000</pubDate>
				<category><![CDATA[Binary Search Trees]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[binary search tree]]></category>
		<category><![CDATA[binary search tree example]]></category>
		<category><![CDATA[binary search tree tutorial]]></category>
		<category><![CDATA[binary tree insertion]]></category>
		<category><![CDATA[BST depth]]></category>
		<category><![CDATA[BST from scratch]]></category>
		<category><![CDATA[BST height]]></category>
		<category><![CDATA[BST insertion]]></category>
		<category><![CDATA[build binary search tree]]></category>
		<category><![CDATA[computer science tutorial]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[data structures and algorithms]]></category>
		<category><![CDATA[in order traversal]]></category>
		<category><![CDATA[insert into binary search tree]]></category>
		<guid isPermaLink="false">https://www.NeuralLantern.com/?p=330</guid>

					<description><![CDATA[<p>In this tutorial we build a binary search tree together by inserting the numbers 73, 98, 12, 45, 67, 10, 43, 11, 99, and 32 one by one. Starting from an empty tree, each number is placed according to binary search tree rules: smaller values go left, larger values go right. We let the nodes fall where they belong without any rearranging, resulting in a realistic (and slightly lopsided) BST. The video explains tree depth, height, and confirms the final structure maintains all BST properties with a properly sorted in-order traversal.</p>
<p>The post <a href="https://www.NeuralLantern.com/building-a-binary-search-tree-insertion-tutorial/">Building a Binary Search Tree &#8211; Insertion Tutorial</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Building a Binary Search Tree - Insertion Tutorial" width="1380" height="776" src="https://www.youtube.com/embed/iuuUaa4CxoU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>In this hands-on video we build a binary search tree by inserting numbers one by one: 73, 98, 12, 45, 67, 10, 43, 11, 99, and 32. Watch exactly how each node finds its place following BST rules with no rearranging allowed.</p>



<p>We discuss why the tree becomes lopsided, calculate its height, and verify the in-order traversal is sorted. Great practice for anyone learning binary search trees.</p>



<p>Next videos will cover searching and deleting nodes.</p>



<p>If you&#8217;re studying data structures, build along with me!</p>



<p>00:00 Introduction to Building a Binary Search Tree<br>00:14 Plan for Inserting Numbers<br>00:30 First Node Becomes Root<br>02:26 Begin inserting from data set<br>12:29 Final insertion from data set<br>13:26 Final Tree Overview<br>13:29 Tree is Lopsided<br>14:00 Drawing Depths and Levels<br>14:50 Calculating Tree Height<br>15:08 Verifying Sorted Order<br>16:00 Confirming BST Properties<br>16:48 Time Complexity and Height<br>18:59 No Self-Balancing<br>19:07 End of Video and Thanks</p>



<p>=-=-=-=-=-=-=-=-=</p>



<p>Thanks for watching!</p>



<p>Find us on other social media here:</p>



<ul class="wp-block-list">
<li>https://www.NeuralLantern.com/social</li>



<li>Twitter / X: https://x.com/NeuralLantern</li>



<li>Rumble: https://rumble.com/c/c-3696939</li>



<li>BitChute: https://www.bitchute.com/channel/pg1Pvv5dN4Gt</li>



<li>Daily Motion: https://www.dailymotion.com/neurallantern</li>



<li>Minds: https://www.minds.com/neurallantern/</li>



<li>Odysee: https://odysee.com/@NeuralLantern:5</li>
</ul>



<p>Please show your support!</p>



<ul class="wp-block-list">
<li>Buy me a coffee: https://ko-fi.com/neurallantern</li>



<li>Subscribe + Sharing on Social Media</li>



<li>Leave a comment or suggestion</li>



<li>Subscribe to the Blog: https://www.NeuralLantern.com</li>



<li>Watch the main &#8220;pinned&#8221; video of this channel for offers and extras</li>
</ul>



<p>hey there let&#8217;s build a binary search tree together if you&#8217;ve seen my previous videos</p>



<p>you understand now how to define a binary search tree meaning what are the rules</p>



<p>that you have to like adhere to if you want your thing to be a binary search tree</p>



<p>also terminology we&#8217;re in previous videos so in this video we&#8217;re just going to take a bunch of</p>



<p>random numbers and we&#8217;re just going to start dropping them into our tree and see how the</p>



<p>tree builds itself out we have to build our tree in a specific way if it&#8217;s going to be valid we&#8217;re</p>



<p>uh valid we&#8217;re not going to rearrange our tree and try to make it super pretty this is going to be</p>



<p>like a real binary search tree it might not be pretty but it&#8217;ll be real let&#8217;s see if i can find</p>



<p>those numbers that i was going to set up okay so for this particular video i think i&#8217;m going to do</p>



<p>two videos i want to build a binary search tree using the following numbers they&#8217;re not special</p>



<p>not not perfect but what I mean to say when I say inserting these numbers is one by one we&#8217;ll look</p>



<p>at each number and we&#8217;ll drop it in the tree and we&#8217;ll see where it falls according to binary</p>



<p>search tree rules of insertion then we&#8217;ll just go to the next number and then the next and the next</p>



<p>when we&#8217;re done we should have a tree and if you follow along at home and you use the right rules</p>



<p>to build your tree then if we use the same sequence of numbers to build the tree we should</p>



<p>they won&#8217;t suddenly be different they&#8217;re deterministic okay so the first thing that</p>



<p>we should try to understand is uh when we want to insert a node the 73 node right here the first</p>



<p>thing we should ask ourselves is do we actually have a root node for our binary search tree yet</p>



<p>right now the answer is no this is just a blank tree there&#8217;s nothing in it which means that first</p>



<p>number is going to be the root node you might be tempted to say no that&#8217;s a sucky root node let&#8217;s</p>



<p>do something else well i don&#8217;t know i mean you just have to let the numbers fall where they&#8217;re</p>



<p>going to fall just because a number seems to suck as a root node doesn&#8217;t mean it&#8217;s not going to be</p>



<p>the root node if it&#8217;s the first thing you added it&#8217;s going to be the root node don&#8217;t try to change</p>



<p>it or you&#8217;re going to mess you&#8217;re going to end up with topology that doesn&#8217;t match whatever system</p>



<p>or person is trying to grade your work or evaluate your work so we have no root node that means the</p>



<p>node of the entire tree we&#8217;re now done with 73 i&#8217;m going to duplicate this slide real fast</p>



<p>and we&#8217;ll say now it&#8217;s time to try to add the 98 you know what i can i think i can do better than</p>



<p>that arrow i can make a nice cute arrow with this program i&#8217;m going to do this can i like yeah</p>



<p>hang on one more one more try nice okay so now let&#8217;s add the 98 node</p>



<p>the first thing we have to ask is do we have a root node uh yes we can&#8217;t actually put the 98 there</p>



<p>we now have to make a decision uh if you recall in my previous videos the lesser values go on the</p>



<p>left and the greater values go on the right uh in in these trees which we&#8217;re not going to support</p>



<p>duplicate values with if you wanted to support duplicate values you could do something like</p>



<p>less than or equal to would be on the left and greater than on the right there&#8217;s a bunch of</p>



<p>other ways you can do it but i&#8217;m just going to say no duplicate values in our trees so we look at the</p>



<p>So we look at the 73 node and we ask, you know, is that where our 98 is going to go?</p>



<p>It can&#8217;t go there because 73 exists.</p>



<p>Now we have to ask the question, does 98 belong on the left side or the right side of the 73?</p>



<p>Well, because 98 is greater than 73, it belongs on the right side, which means I&#8217;m going to duplicate this node over here.</p>



<p>And I&#8217;m going to try to draw this well, which means basically splitting the difference in terms of the empty space.</p>



<p>empty space and trying to keep the same rank as we go down one level of</p>



<p>descendancy or like one generation down at a time.</p>



<p>So the next time I go down a level,</p>



<p>let&#8217;s say I do a left child in the future,</p>



<p>it should be at the same level as the new node I just added.</p>



<p>So I did a duplicate and I forgot to change the number.</p>



<p>And then I&#8217;m going to do a line to connect the 73 and the 98.</p>



<p>98 so now the 73 has a right child which is 98 the 98 has a parent which is 73 and we&#8217;re done</p>



<p>adding the 98 we have to just move on to the next number okay so i&#8217;m going to move on to the 12</p>



<p>again we look at the root node it&#8217;s occupied we cannot put the 12 right there on the 73 we have</p>



<p>to make a decision do we go to the left or the right of the 73 12 is less than 73 so it belongs</p>



<p>is to jump to the left side. Notice how the left side there&#8217;s no child on the left that means that&#8217;s</p>



<p>where the new node is going to go so I&#8217;m just going to like select this duplicate it real fast</p>



<p>maybe stick it on the same vertical coordinate and then also try to split the difference on</p>



<p>the screen just to make it look pretty. I&#8217;m going to update that 98 so that it is now the 12.</p>



<p>child 12 and then we&#8217;re done adding the 12. Okay, no problem so far. We then are ready to try to</p>



<p>add the 45. Maybe I should squish this a little bit. Nope, that looks gross. No, it&#8217;s okay.</p>



<p>We&#8217;ll do that. We&#8217;re going to add the 45. Again, we look at the root node. It already exists,</p>



<p>so we can&#8217;t put the 45 there. Instead, we will just kind of decide does the 45 belong on the</p>



<p>Okay, well, belongs on the left because it&#8217;s less than 73.</p>



<p>So that means I&#8217;m now going to make a little decision.</p>



<p>I&#8217;m going to jump down to the left.</p>



<p>If you&#8217;re in some code, you&#8217;re following the left child pointer down.</p>



<p>But notice how the left child pointer or the left child, it already exists.</p>



<p>So we can&#8217;t actually put 45 right there.</p>



<p>We have to make another decision.</p>



<p>Does 45 belong on the left or the right of the 12?</p>



<p>Well, it&#8217;s greater than 12.</p>



<p>So it belongs on the right side of 12.</p>



<p>So I&#8217;m going to highlight this and duplicate it.</p>



<p>and duplicate it. I guess I&#8217;ll just do it that way. Then I&#8217;m going to update that number</p>



<p>with 45 and then I&#8217;m going to connect the 12 and the 45 with the line. So now 45 is the right child</p>



<p>of 12 and 12 is the parent of 45. It&#8217;s at this point that a lot of people start to get frustrated</p>



<p>with me and they say, well, how come, how come the 12 is like all the way to the left and the 45 is</p>



<p>45 is like didn&#8217;t become like you know a level higher because it kind of seems like it&#8217;s closer</p>



<p>to 73 shouldn&#8217;t the 12 be hanging off the left child of the 45 no no no no don&#8217;t rearrange the</p>



<p>nodes as you&#8217;re building the tree just let the numbers let the nodes fall wherever they&#8217;re</p>



<p>supposed to go another tip is if you&#8217;re building a tree that has other data types as as the t types</p>



<p>inside of the nodes as the template types inside of the nodes for example right now I&#8217;m just using</p>



<p>type is int, at least in my mind, if you wanted to put dinosaur objects in the tree, all you&#8217;d</p>



<p>have to do is make sure that your code for your dinosaur class for your dinosaur object</p>



<p>had its inequality operators implemented, you know, less than, greater than, and then the tree</p>



<p>would still know where to put all the objects. So you could make any kind of custom object you want</p>



<p>and they would all fall in their correct places in the tree as long as the operators actually</p>



<p>just as a side note. Okay, so now we&#8217;re ready to add the next item. So I&#8217;m going to erase this</p>



<p>stuff here, and I&#8217;m going to move the arrow from the 45 to the 67. So now we&#8217;re going to try to</p>



<p>add the 67. We look at the root node, it&#8217;s occupied. We should go to the left because 67</p>



<p>is less than 73. We look at the 12, that&#8217;s occupied. So we go left or right. We should go</p>



<p>to the right because 67 is greater than 12. So we look at the 45. Again, it&#8217;s occupied. There&#8217;s a</p>



<p>a node there so we have to make another decision do we go to the left or to the right well 67 is</p>



<p>greater than 45 so it goes on the right side so i&#8217;m going to duplicate this off to the right side</p>



<p>and down a rank and we&#8217;ll call that the right child of 45. let me update the number here</p>



<p>to 67 and i&#8217;ll connect that as the right child okay</p>



<p>Any questions? I&#8217;m just kidding. That was rude. Just know that my heart is with you if you&#8217;re</p>



<p>asking questions. Send me a comment in the comments. So now I&#8217;m going to move over to the 10 here.</p>



<p>Again, we look at the 67. The 10 belongs on the left. So we kind of go to the left.</p>



<p>We look at the 12. The 10 belongs on the left of the 12 because it&#8217;s less than 12.</p>



<p>available slot that&#8217;s an available child pointer so I&#8217;m going to say the 10 is going to be the</p>



<p>left child of the 12 node maybe I&#8217;ll stick it all the way over there let&#8217;s see is there anything</p>



<p>less than 10 in there nope okay so we&#8217;ll be good we have enough space on the screen</p>



<p>so change that to a 10 do the connecting line so the 10 is now the left child</p>



<p>whoops the left child of the 12 node and now we&#8217;re ready to add the next node</p>



<p>node. Okay. So now the 43 is the next one we want to add. One more time, we look at the 73 node,</p>



<p>the root node is occupied. So we have to go to the left because 43 is less. So oops, that&#8217;s a line.</p>



<p>So now we look at the 12 node is 43 greater than or less than the 12. It&#8217;s greater than so that</p>



<p>means we go down to the right. But the 45 is there. So we have to make another decision. 43 is less</p>



<p>43 is less than 45 so we go to the left that means this 43 is going to be the left child of 45.</p>



<p>And again don&#8217;t try to make the tree pretty or better just let the nodes fall wherever they&#8217;re</p>



<p>supposed to fall according to the rules of less than or greater than. So now we got the uh whoops</p>



<p>I forgot to change that to a 43. The 43 right there and we are now ready to add another node</p>



<p>So I&#8217;m going to like erase this stuff here and I want to move the arrow to the 11.</p>



<p>Now once again, we&#8217;re looking for the root node.</p>



<p>It&#8217;s already occupied.</p>



<p>We say that 11 is supposed to go on the left because it&#8217;s less than.</p>



<p>We look at the 12.</p>



<p>It&#8217;s occupied.</p>



<p>So we have to go to the left because 11 is less than 12.</p>



<p>We go to the 10 and that&#8217;s also occupied.</p>



<p>So we have to make another decision.</p>



<p>Is 11 greater than or less than 10?</p>



<p>It&#8217;s greater than.</p>



<p>why the 11 goes on the right side of the 10. So I&#8217;m going to duplicate this over here. Notice how</p>



<p>I&#8217;m trying to keep same ranked children or same depth children physically at the same level. It&#8217;s</p>



<p>a lot easier to debug your diagrams if you do things this way. Notice also, as I mentioned in</p>



<p>a previous video, that every left descendant of a node should be physically on the left side in my</p>



<p>diagram and every right descendant should be physically on the right side. That just makes</p>



<p>right side that just makes the diagram way easier to debug what do I mean by this look at 73&#8217;s left</p>



<p>descendants its left subtree they&#8217;re all physically on the left look at the 12 node all of its right</p>



<p>descendants or its right subtree they&#8217;re all physically on the right so you if you follow</p>



<p>that rule it&#8217;s just way easier to debug I think I forgot to update that number from 43 to 11 so</p>



<p>I&#8217;m going to do that now and we are ready to add the next number the 99 so I&#8217;m going to do this</p>



<p>So I&#8217;m going to do this. We&#8217;re looking at 99.</p>



<p>So first we start off by looking at the root node.</p>



<p>It&#8217;s 73, occupied. 99 belongs on the right side.</p>



<p>So now we bounce to the right side and we look at the 98.</p>



<p>Whoops, whoops, whoops. We look at the 98.</p>



<p>That&#8217;s occupied, so we make another decision.</p>



<p>The 99 belongs on the right side of 98. That slot is available.</p>



<p>So now we can say that the 99 node is supposed to be</p>



<p>a right child of 99.</p>



<p>Sorry, sorry.</p>



<p>The 99 is the right child of the 98 node.</p>



<p>I&#8217;m getting a little confused.</p>



<p>Okay, so I&#8217;m gonna do a little connecting line there.</p>



<p>And we&#8217;re ready to add the final value into our tree.</p>



<p>So I&#8217;m gonna do, let&#8217;s see.</p>



<p>Oh, oh, I accidentally erased the arrow.</p>



<p>Oh, there it is.</p>



<p>We can add the 32 next.</p>



<p>add the 32 next and if we look at the 73 it&#8217;s occupied 32 belongs on the left so then we just</p>



<p>kind of like follow down to the left here we look at the 12 32 belongs on the right of 12 so we</p>



<p>follow down to the right 32 belongs on the left of 45 so we follow down to the left 32 belongs on</p>



<p>the left of 43 and so we will make 32 the left child of the 43 node so I&#8217;m going to like select</p>



<p>this real fast we go down a full rank and I&#8217;m going to try to split the difference between 12</p>



<p>And I&#8217;m going to try to split the difference between 12 and 43 here just to make the diagram easier to debug.</p>



<p>Okay, so then I&#8217;m going to do…</p>



<p>It&#8217;s looking a little gross, but at least we&#8217;re finished.</p>



<p>I have to update that 11 to be the 32.</p>



<p>And now we&#8217;re done building our tree.</p>



<p>Okay, so some things to point out real fast.</p>



<p>Notice how the tree is lopsided.</p>



<p>to look at various parts of the tree you might be frustrated why didn&#8217;t we put the 98 over there</p>



<p>why didn&#8217;t we put the right just it&#8217;s fine as long as we follow the rules of building a binary search</p>



<p>tree then this is the valid tree that we would have built of course later on you&#8217;ll learn techniques</p>



<p>to make the tree a little bit better looking a little bit faster but right now we&#8217;re just building</p>



<p>a tree with no optimizations no self balancing no anything like that this is our binary search tree</p>



<p>tree if we were to take all of the uh you know all the numbers that we added and sort them</p>



<p>then that should be the numbers we see from left to right this is another good argument for why we</p>



<p>should draw the diagram in this way again like uh same depth nodes let me just draw the the depths</p>



<p>real fast just to kind of illustrate the point a little bit same depth nodes should be on the same</p>



<p>y coordinate or the same uh horizontal plane notice how 73 is the root node and then 12 with 98 have</p>



<p>with 98 have a depth of 1 and then 10 45 and 99 have a depth of 2 and then 11 43 and 67 have a</p>



<p>depth of 3 and then 32 has a depth of 4 so the deepest node we can find has a depth of 4 that&#8217;s</p>



<p>the 32 node which means the height of the tree um height is 4 sorry 5 the height is always the</p>



<p>deepest nodes depth plus 1 or the number of nodes you would have to touch as you found your way</p>



<p>you found your way down to the deepest node for example if we wanted to get to that 32 we would</p>



<p>touch one two three four five nodes so the height of this tree is five</p>



<p>okay um let&#8217;s debug the order of our numbers because this is kind of easy to get wrong</p>



<p>so from left to right we should see a sorted list so let me just uh do little markings here</p>



<p>to indicate that i&#8217;m seeing increasing or at least non-decreasing numbers</p>



<p>If our tree supported duplicates, then it would be non-decreasing.</p>



<p>But since we don&#8217;t allow duplicates, it should be increasing or an ascending list.</p>



<p>So I&#8217;m going to do the 10.</p>



<p>And as we look towards the right, we should see increasing numbers.</p>



<p>So we got the 10 there.</p>



<p>And then we got the 11 there.</p>



<p>And then we got the 12 there.</p>



<p>32, 43, 45, 67.</p>



<p>So far, so good.</p>



<p>It&#8217;s all increasing.</p>



<p>73 increases, 98 increases, and 99 increases.</p>



<p>and 99 increases. So from left to right, it was basically a sorted list, which is what we want.</p>



<p>So we&#8217;ve created a valid ordering for the tree. Now maybe just think about all the rules of a</p>



<p>binary search tree to make sure we did that right too. So is this a graph? Yeah. Is it a connected</p>



<p>graph? Yeah. Is it a tree? You know, no cycles in the graph? Yeah. Is it a rooted tree? Yeah. The 73</p>



<p>root node is the common ancestor of all other nodes. We have one node that&#8217;s common to the</p>



<p>in terms of ancestry um does any node have more than two children no none of the nodes have more</p>



<p>than two children um they&#8217;ve all got zero or one or two children and then the numbers are in order</p>



<p>and therefore this is a valid binary search tree so in other videos i&#8217;m going to talk about the</p>



<p>time complexity and and like you know how fast it is to do certain operations or how imbalanced a</p>



<p>just so you know this is not a perfect binary search tree you can tell because it&#8217;s a little</p>



<p>lopsided um we calculated the height as five and let&#8217;s see where the heck is that calculator i</p>



<p>thought i had a calculator on here oh no oh there it is if we calculated the height as five</p>



<p>you could probably imagine and we&#8217;ll talk about searching in a future video like how do you search</p>



<p>in a way that makes the tree super super fast well we certainly built the tree in a way that</p>



<p>makes it super super fast we just have to get to searching later but if we</p>



<p>search properly through a properly built binary search tree then at most it</p>



<p>should only take us height number of examinations to find our way to any</p>



<p>piece of data or to determine that a piece of data doesn&#8217;t exist for example</p>



<p>I could say that the time complexity is O and we&#8217;ll do this in other videos of</p>



<p>of h no matter what the tree looks like no matter how lopsided it is and what is h here five that</p>



<p>just basically is saying in the worst case scenario i would have to touch five nodes to reach the very</p>



<p>bottom of the tree and determine that a value didn&#8217;t exist or you know find a value at the very</p>



<p>bottom of the tree so the worst case scenario touch five nodes so it&#8217;s o of h if we if we plug</p>



<p>log base 2 so if we did log base 2 of n where n is the number of nodes uh oh how many nodes do we</p>



<p>have shoot one two three four five six seven eight nine ten i think one two three four five six seven</p>



<p>eight nine ten yeah log base two of ten notice how the number here says well it should take like</p>



<p>somewhat close to three uh examinations at most four examinations but we just said it&#8217;s going to</p>



<p>of a divergence between the real speed of the tree.</p>



<p>It might take up to five examinations and log base two,</p>



<p>which would be a perfect binary search tree.</p>



<p>So the more lopsided a tree gets, the slower it actually becomes.</p>



<p>And we&#8217;ll deal with that in future videos.</p>



<p>We&#8217;ll learn how to like detect that and balance that and so forth.</p>



<p>But so we&#8217;ve built a binary search tree.</p>



<p>It&#8217;s definitely valid if not, you know, like super, super fast.</p>



<p>And I think that&#8217;s the end of this video.</p>



<p>Thank you so much for watching.</p>



<p>I hope you learned a little bit of stuff and had a little bit of fun.</p>



<p>In the next video, I think I&#8217;m just going to build another tree for you so we can get</p>



<p>a second practice in.</p>



<p>Okay, future videos also are going to include searching and deleting nodes and modifying</p>



<p>existing nodes and just a whole bunch of other stuff.</p>



<p>Then eventually we&#8217;ll do self-balancing trees.</p>



<p>I&#8217;ll see you later.</p>



<p>Hey everybody.</p>



<p>Hey everybody!</p>



<p>Thanks for watching this video again from the bottom of my heart.</p>



<p>I really appreciate it.</p>



<p>I do hope you did learn something and have some fun.</p>



<p>If you could do me a please, a small little favor, could you please subscribe and follow</p>



<p>this channel or these videos or whatever it is you do on the current social media website</p>



<p>that you&#8217;re looking at right now.</p>



<p>It would really mean the world to me and it&#8217;ll help make more videos and grow this community.</p>



<p>So we&#8217;ll be able to do more videos, longer videos, better videos, or just I&#8217;ll be able</p>



<p>I&#8217;ll be able to keep making videos in general.</p>



<p>So please do me a kindness and subscribe.</p>



<p>You know, sometimes I&#8217;m sleeping in the middle of the night</p>



<p>and I just wake up because I know somebody subscribed or followed.</p>



<p>It just wakes me up and I get filled with joy.</p>



<p>That&#8217;s exactly what happens every single time.</p>



<p>So you could do it as a nice favor to me</p>



<p>or you could troll me if you want to just wake me up in the middle of the night.</p>



<p>Just subscribe and then I&#8217;ll just wake up.</p>



<p>I promise that&#8217;s what will happen.</p>



<p>Also, if you look at the middle of the screen right now,</p>



<p>right now you should see a QR code which you can scan in order to go to the website which I think</p>



<p>is also named somewhere at the bottom of this video and it&#8217;ll take you to my main website where</p>



<p>you can just kind of like see all the videos I published and the services and tutorials and</p>



<p>things that I offer and all that good stuff and if you have a suggestion for clarifications or</p>



<p>errata or just future videos that you want to see please leave a comment or if you just want to say</p>



<p>what&#8217;s going on you know just send me a comment whatever i also wake up for those in the middle</p>



<p>of the night i get i wake up in a cold sweat and i&#8217;m like it would really it really mean the world</p>



<p>to me i would really appreciate it so again thank you so much for watching this video and um enjoy</p>



<p>the cool music as as i fade into the darkness which is coming for us all</p>



<p>Thank you.</p>



<p>hey there let&#8217;s talk about uh</p>



<p>hello there hello there let&#8217;s build a binary search tree by just inserting a bunch of numbers</p>



<p>inserting a bunch of numbers and will follow the rules</p>
<p>The post <a href="https://www.NeuralLantern.com/building-a-binary-search-tree-insertion-tutorial/">Building a Binary Search Tree &#8211; Insertion Tutorial</a> appeared first on <a href="https://www.NeuralLantern.com">NeuralLantern.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.NeuralLantern.com/building-a-binary-search-tree-insertion-tutorial/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
