<?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%3Asgha014</id>
	<title>SE250:lab-6:sgha014 - 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%3Asgha014"/>
	<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-6:sgha014&amp;action=history"/>
	<updated>2026-04-29T01:17: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-6:sgha014&amp;diff=7335&amp;oldid=prev</id>
		<title>Mark: 14 revision(s)</title>
		<link rel="alternate" type="text/html" href="https://wiki.kram.nz/index.php?title=SE250:lab-6:sgha014&amp;diff=7335&amp;oldid=prev"/>
		<updated>2008-11-03T05:20:09Z</updated>

		<summary type="html">&lt;p&gt;14 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;
visual studio was stuffing up again...as usual...so then i tried using that cygwin thing...&lt;br /&gt;
then kept getting errors....got help from mark and he was confused too...he said that for some reason it was running out of memory...so we compiled and ran it about 6 times and then for some reason it started working??? which was really weird...&lt;br /&gt;
 	int heightOfTree;&lt;br /&gt;
 &lt;br /&gt;
 	Node* node = makeRandomTree(7);&lt;br /&gt;
 	heightOfTree = height(node);&lt;br /&gt;
 	printf(&amp;quot;height: %d&amp;quot;, heightOfTree);&lt;br /&gt;
also...whats the differnce between Node* node and Node *node ??? Mark said he didnt know either.&lt;br /&gt;
&lt;br /&gt;
i varied the siz from 0 to 300...went up in 5s&lt;br /&gt;
&lt;br /&gt;
[http://img59.imageshack.us/img59/1926/ssiz3.jpg graph]&lt;br /&gt;
&lt;br /&gt;
==task2==&lt;br /&gt;
i started off using if statements then the tutor said that wont work and said we hav 2 use a loop&lt;br /&gt;
 Node* minimum( Node* node ) {&lt;br /&gt;
   /* TODO */&lt;br /&gt;
 	while(node-&amp;gt;left != empty){&lt;br /&gt;
 		node = node-&amp;gt;left;&lt;br /&gt;
 	}&lt;br /&gt;
 	return node;&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 Node* maximum( Node* node ) {&lt;br /&gt;
   /* TODO */&lt;br /&gt;
 	while(node-&amp;gt;right != empty){&lt;br /&gt;
 		node = node-&amp;gt;right;&lt;br /&gt;
 	}&lt;br /&gt;
 	return node;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
i got the minimum and maximum for a tree of size 100 and got a min of 41 and a max of 32757&lt;br /&gt;
&lt;br /&gt;
==task3==&lt;br /&gt;
i was abit unsure about this task at first and it took a while for me to get it.&lt;br /&gt;
but in the end this is what i got&lt;br /&gt;
 Node* lookup( int key, Node* node ) {&lt;br /&gt;
   /* TODO */&lt;br /&gt;
 	&lt;br /&gt;
 	while(node != empty){&lt;br /&gt;
 		if(key == node-&amp;gt;key)&lt;br /&gt;
 			return node;&lt;br /&gt;
 		else if (key &amp;lt; node-&amp;gt;key)&lt;br /&gt;
  			node = node-&amp;gt;left;&lt;br /&gt;
 		else&lt;br /&gt;
 			node = node-&amp;gt;right;&lt;br /&gt;
 	}			&lt;br /&gt;
 }&lt;br /&gt;
im unsure about how to test it though so i dont know if its actually right&lt;/div&gt;</summary>
		<author><name>Mark</name></author>
	</entry>
</feed>