<?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-6%3Ahlin079</id>
	<title>SE250:lab-6:hlin079 - 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-6%3Ahlin079"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-6:hlin079&amp;action=history"/>
	<updated>2026-04-15T12:27:50Z</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-6:hlin079&amp;diff=7108&amp;oldid=prev</id>
		<title>Mark: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-6:hlin079&amp;diff=7108&amp;oldid=prev"/>
		<updated>2008-11-03T05:20:04Z</updated>

		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;====task1====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int main(){&lt;br /&gt;
    int i;&lt;br /&gt;
    for (i=1;i&amp;lt;100;i++){&lt;br /&gt;
	printf(&amp;quot;%d\n&amp;quot;,height(makeRandomTree(i)));&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I used a for loop to increase the size of the tree from 1 to99. After that I measured the height of each tree. I used Excel to plot the graph to find the relationship between height of the tree and the size of tree.  The graph for that is on: http://img208.imageshack.us/img208/1999/40449269bf1.jpg&lt;br /&gt;
I used another for loop to increase the size of tree from 1 to 10000. I plotted the graph for that as well, I found that the height for the much greater size of binary tree (I e. 10000) is not much higher the height of the smaller size of the binary tree (ie.98).&lt;br /&gt;
====task2====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Node* minimum( Node* node ) {&lt;br /&gt;
    if (node==empty){&lt;br /&gt;
	return empty;&lt;br /&gt;
    }&lt;br /&gt;
    for (; node-&amp;gt;left !=empty;node=node-&amp;gt;left){&lt;br /&gt;
    }&lt;br /&gt;
    return node;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Node* maximum( Node* node ) {&lt;br /&gt;
 if (node==empty){&lt;br /&gt;
	return empty;&lt;br /&gt;
    }&lt;br /&gt;
    for (; node-&amp;gt;right!=empty;node=node-&amp;gt;right){&lt;br /&gt;
	return node;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>