<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div><font size="3">
Assume a tree is a subtree of the other if all elements of the first
tree is included in the second with the exact structure; all
parent-child relations are preserved with their order.<br><br></font><font size="3"><span style="font-family: monospace;">data
Tree = Empty | Leaf Int | Node (Int,Tree,Tree)<br></span><span style="font-family: monospace;">subtree::
Tree -> Tree -> Bool<br><br>How can i start to write this code with this data structure? <br>Example;<br><br></span></font><table style="text-align: left; width: 200px;" border="1" cellpadding="3" cellspacing="0"><tbody><tr><td style="text-align: center; font-family: monospace; font-weight: bold;" valign="middle">tree1</td>
<td style="text-align: center; font-family: monospace; font-weight: bold;" valign="middle">tree2</td>
</tr>
<tr>
<td align="left" valign="middle">
<pre> 3<br> / \<br>5 6<br> / \<br> 7 4<br></pre> </td>
<td style="vertical-align: middle; text-align: left;">
<pre> 13<br> / \<br> <span style="font-weight: bold;">3</span> 12<br> / \ / \ <br> <span style="font-weight: bold;">5</span> <span style="font-weight: bold;">6</span> 9 6<br> / \ / \<br> <span style="font-weight: bold;">7</span> <span style="font-weight: bold;">4</span> 11 7<br> / / \<br> 2 3 4<br></pre></td></tr></tbody></table><br></div></div><br>
<hr size=1>Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ "> Try it now.</a></body></html>