Funzione che conta le foglie di un albero

int conta_foglie(nodo *x){
 if(!x)  return 0;
 else{
 if((x->left==0) && (x->right==0))
 return 1;
 else
 return (conta_foglie(x->left))+conta_foglie(x->right));
 }
}
Tothebit

About Tothebit

Tothebit

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site