<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Srinivas&#039;s Blog</title>
	<atom:link href="http://lsvatiisc.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lsvatiisc.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 24 Aug 2010 07:47:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lsvatiisc.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Srinivas&#039;s Blog</title>
		<link>http://lsvatiisc.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lsvatiisc.wordpress.com/osd.xml" title="Srinivas&#039;s Blog" />
	<atom:link rel='hub' href='http://lsvatiisc.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Search for a value in a BST</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/24/search-for-a-value-in-a-bst/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/24/search-for-a-value-in-a-bst/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 07:47:05 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Search for a Value]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=170</guid>
		<description><![CDATA[/* ITERATIVE*/ mynode *searchtree(mynode *root, int value){ while(root &#38;&#38; value != root -&#62; data){ root = (value &#62; root -&#62; data) ? root -&#62; right : root -&#62; left; } return(root); } /* RECURSIVELY */ mynode *searchtree(mynode *root, int value){ if(root -&#62; data == value) return root; if(value &#62; root -&#62; data) return (searchtree(root -&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=170&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>/* ITERATIVE<span style="color:#888888;"></span>*/</strong><br />
mynode *searchtree(mynode *root, int value){<br />
while(root &amp;&amp; value != root -&gt; data){<br />
root = (value &gt; root -&gt; data) ? root -&gt; right : root -&gt; left;<br />
}<br />
return(root);<br />
}</p>
<p><strong>/* RECURSIVELY */</strong><br />
mynode *searchtree(mynode *root, int value){<br />
if(root -&gt; data == value)<br />
return root;<br />
if(value &gt; root -&gt; data)<br />
return (searchtree(root -&gt; right, value));<br />
if(value &lt; root -&gt; data)<br />
return (searchtree(root -&gt; left, value));<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=170&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/24/search-for-a-value-in-a-bst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Count the number of leaves in a tree</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/24/count-the-number-of-leaves-in-a-tree/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/24/count-the-number-of-leaves-in-a-tree/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 07:41:44 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Count the number of leaves]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=167</guid>
		<description><![CDATA[int count_leafs(mynode *root){ static int count; if(root){ countleafs(root -&#62; left); if(!root -&#62; left &#38;&#38; !root -&#62; right) count++; countleafs(root -&#62; right); } return count; }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=167&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>int count_leafs(mynode *root){<br />
static int count;<br />
if(root){<br />
countleafs(root -&gt; left);<br />
if(!root -&gt; left &amp;&amp; !root -&gt; right)<br />
count++;<br />
countleafs(root -&gt; right);<br />
}<br />
return count;<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=167&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/24/count-the-number-of-leaves-in-a-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Level Order Traversal of a Tree</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/level-order-traversal-of-a-tree/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/level-order-traversal-of-a-tree/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 08:06:00 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Level order traversal]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=160</guid>
		<description><![CDATA[Example: If this is the tree &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-7 &#8212;&#8212;&#8211;5                  10 4          6        9          11 then its level order traversal would be 7     5    10      4      6        9      11 Using queue we can do the traversal, here is the some working C code: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- void levelorderTraversal(mynode [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=160&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Example: If this is the tree</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-7</p>
<p>&#8212;&#8212;&#8211;5                  10</p>
<p>4          6        9          11</p>
<p>then its level order traversal would be</p>
<p>7     5    10      4      6        9      11</p>
<p>Using queue we can do the traversal, here is the some working C code:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>void levelorderTraversal(mynode *root){<br />
mynode *queue[100] = {(mynode *)0};<br />
int queue_number, size;<br />
queue_number = size = 0;<br />
while(root){<br />
printf(&#8220;%2d&#8221;, root -&gt; data);<br />
if(root -&gt; left)<br />
queue[size++] = root -&gt; left;<br />
if(root -&gt; right)<br />
queue[size++] = root -&gt; right;<br />
root = queue[queue_number++];<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=160&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/level-order-traversal-of-a-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Freeup nodes</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/freeup-nodes/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/freeup-nodes/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:29:09 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Free the nodes]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=155</guid>
		<description><![CDATA[void freeup(mynode *root){ if(root){ freeup(root -&#62; left); freeup(root -&#62; right); free(root); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=155&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>void freeup(mynode *root){<br />
if(root){<br />
freeup(root -&gt; left);<br />
freeup(root -&gt; right);<br />
free(root);<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=155&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/freeup-nodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Inorder</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/print-inorder/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/print-inorder/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:27:50 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Inorder]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=152</guid>
		<description><![CDATA[void print_inorder(mynode *root){ if(root){ print_inorder(root -&#62; left); printf(&#8220;%6d&#8221;, root -&#62; data); print_inorder(root -&#62; right); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=152&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>void <strong>print_inorder</strong>(mynode *root){<br />
if(root){<br />
print_inorder(root -&gt; left);<br />
printf(&#8220;%6d&#8221;, root -&gt; data);<br />
print_inorder(root -&gt; right);<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=152&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/print-inorder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Preorder</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/print-preorder/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/print-preorder/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:26:36 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Preorder]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=149</guid>
		<description><![CDATA[void print_preorder(mynode *root){ if(root){ printf(&#8220;%6d&#8221;, root -&#62; data); print_preorder(root -&#62; left); print_preorder(root -&#62; right); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=149&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>void<strong> print_preorder</strong>(mynode *root){<br />
if(root){<br />
printf(&#8220;%6d&#8221;, root -&gt; data);<br />
print_preorder(root -&gt; left);<br />
print_preorder(root -&gt; right);<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=149&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/print-preorder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Print Postorder</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/preorder-inorder-postorder/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/preorder-inorder-postorder/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:21:42 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Postorder]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=142</guid>
		<description><![CDATA[void print_postorder(mynode *root){ if(root){ print_postorder(root -&#62; left); print_postorder(root -&#62; right); printf(&#8220;%6d&#8221;, root -&#62; data); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=142&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>void <strong>print_postorder</strong>(mynode *root){<br />
if(root){<br />
print_postorder(root -&gt; left);<br />
print_postorder(root -&gt; right);<br />
printf(&#8220;%6d&#8221;, root -&gt; data);<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=142&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/preorder-inorder-postorder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Size(Number of elements) of the Tree</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/sizenumber-of-elements-of-the-tree/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/sizenumber-of-elements-of-the-tree/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:18:14 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Size of the Tree]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=139</guid>
		<description><![CDATA[int size(mynode *root){ if(root == NULL) return 0; else{ if(!root -&#62; left &#38;&#38; !root -&#62; right) return 1; else return (1 + size(root -&#62; left) + size(root -&#62; right)); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=139&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>int size(mynode *root){<br />
if(root == NULL)<br />
return 0;<br />
else{<br />
if(!root -&gt; left &amp;&amp; !root -&gt; right)<br />
return 1;<br />
else<br />
return (1 + size(root -&gt; left) + size(root -&gt; right));<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=139&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/sizenumber-of-elements-of-the-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Height of the Tree</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/height-of-the-tree/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/height-of-the-tree/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 06:17:05 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Height of the Tree]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=136</guid>
		<description><![CDATA[int height(mynode *root){ int h1, h2 = 0, ret; if(root == NULL) return 0; if(root -&#62; left) h1 = height(root -&#62; left); if(root -&#62; right) h2 = height(root -&#62; right); if(!root -&#62; left &#38;&#38; !root -&#62; right) return 0; return (max(h1, h2)+ 1); }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=136&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>int height(mynode *root){<br />
int h1, h2 = 0, ret;<br />
if(root == NULL)<br />
return 0;<br />
if(root -&gt; left)<br />
h1 = height(root -&gt; left);<br />
if(root -&gt; right)<br />
h2 = height(root -&gt; right);<br />
if(!root -&gt; left &amp;&amp; !root -&gt; right)<br />
return 0;<br />
return (max(h1, h2)+ 1);<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=136&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/height-of-the-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
		<item>
		<title>Finding Minimum Value</title>
		<link>http://lsvatiisc.wordpress.com/2010/08/18/finding-minimum-value/</link>
		<comments>http://lsvatiisc.wordpress.com/2010/08/18/finding-minimum-value/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 04:20:28 +0000</pubDate>
		<dc:creator>lsvatiisc</dc:creator>
				<category><![CDATA[Minimum Value]]></category>

		<guid isPermaLink="false">http://lsvatiisc.wordpress.com/?p=133</guid>
		<description><![CDATA[mynode *minval(mynode *root){ if(!root) return 0; else{ if(root -&#62; left == NULL) return root; else return (minval(root -&#62; left)); } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=133&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>mynode *minval(mynode *root){<br />
if(!root)<br />
return 0;<br />
else{<br />
if(root -&gt; left == NULL)<br />
return root;<br />
else<br />
return (minval(root -&gt; left));<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lsvatiisc.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lsvatiisc.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lsvatiisc.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lsvatiisc.wordpress.com&amp;blog=8909382&amp;post=133&amp;subd=lsvatiisc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lsvatiisc.wordpress.com/2010/08/18/finding-minimum-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db03b38b1f593fa2ae2c83301ed782d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lsvatiisc</media:title>
		</media:content>
	</item>
	</channel>
</rss>
