what does following code do?
<p>i dont understand what does  following code?</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;
struct node{
    int k; node * l,*r;
    node (int  t){
        k=t; l=0;r=0;
    }    
};

typedef node * link;
link Max(int a[],int l,int r)
{
    int m=(r+l)/2;
    link x=new node(a[m]);
    if (l==r) return x;
    x-&gt;l=Max(a,l,r);
    x-&gt;r=Max(a,m+1,r);
    int u=x-&gt;l-&gt;k;
    int v=x-&gt;r-&gt;k;
    if (u&gt;v) 
        x-&gt;k=u;  
    else x-&gt;k=v;
    return x;

}

int main()
{
    int *a=new int[100];
    int n=sizeof(a)/sizeof(a[0]);
    for (int i=0;i&lt;n;i++){
        a[i]=rand() ;        
    }
    //for (int i=0;i&lt;n;i++){

    //  cout&lt;&lt;a[i]&lt;&lt; "  ";
    //}
    cout&lt;&lt;Max(a,0,n-1)&lt;&lt; "  ";

    return 0;
}
</code></pre>
