//MIN_INT= -32768
//iterative function
max(Node *p){
int m= INT32_MIN;
while(p){
if(p->data > m)
m=p->data;
p=p->next;
}
return m;
}
//recursive function
max(Node *p){
int x=0;
if(p==0)
return INT32_MIN;
else
x= max(p->next);
if(x>p->data)
return x;
else
return p->data;
}