<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-7%3Ajsmi233</id>
	<title>SE250:lab-7:jsmi233 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kram.nz/index.php?action=history&amp;feed=atom&amp;title=SE250%3Alab-7%3Ajsmi233"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-7:jsmi233&amp;action=history"/>
	<updated>2026-04-30T20:16:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.kram.nz/index.php?title=SE250:lab-7:jsmi233&amp;diff=7649&amp;oldid=prev</id>
		<title>Mark: 2 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-7:jsmi233&amp;diff=7649&amp;oldid=prev"/>
		<updated>2008-11-03T05:20:16Z</updated>

		<summary type="html">&lt;p&gt;2 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Playing with balanced binary search tree&amp;#039;s ==&lt;br /&gt;
&lt;br /&gt;
I inserted the words &amp;#039;hello&amp;#039; &amp;#039;world&amp;#039; &amp;#039;from&amp;#039; &amp;#039;a&amp;#039; &amp;#039;binary&amp;#039; &amp;#039;search&amp;#039; &amp;#039;tree&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The resulting tree:&lt;br /&gt;
&lt;br /&gt;
--a&lt;br /&gt;
&lt;br /&gt;
---binary&lt;br /&gt;
&lt;br /&gt;
-from&lt;br /&gt;
&lt;br /&gt;
hello&lt;br /&gt;
&lt;br /&gt;
--search&lt;br /&gt;
&lt;br /&gt;
---tree&lt;br /&gt;
&lt;br /&gt;
-world&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Random lol interlude == &lt;br /&gt;
&lt;br /&gt;
Lolz!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
&lt;br /&gt;
Clear tree = crash!!!!!!!!!&lt;br /&gt;
&lt;br /&gt;
Teh code failz!!!!!!!!!!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Back to work ==&lt;br /&gt;
&lt;br /&gt;
Inserting the elements dbacfeg in any order will result in a balanced tree provided the following conditions are met: &amp;#039;d&amp;#039; comes first, &amp;#039;b&amp;#039; comes before &amp;#039;a&amp;#039; and &amp;#039;c&amp;#039;, and &amp;#039;f&amp;#039; comes before &amp;#039;e&amp;#039; and &amp;#039;g&amp;#039;. The reason for these conditions is that a parent must be inserted before its children. I estimate that there are fifty six different insertion combinations that result in a balanced tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Starting from a right skew, repeatedly use &amp;quot;rotate left&amp;quot; and then &amp;quot;root&amp;quot; to bring the tree into a left skew format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Starting from a right skew, use the following combination of commands to balance the tree:&lt;br /&gt;
&lt;br /&gt;
-{Rotate left, parent} three times&lt;br /&gt;
&lt;br /&gt;
-left, rotate right, parent&lt;br /&gt;
&lt;br /&gt;
-right, rotate left, parent&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From a balanced tree (seven elements), if two more elements (greater than all current elements) are added to the tree, then the tree can be rebalanced with the commands: right, right, rotate left.&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>