SHARE
TWEET

1e

matheus__serpa Jun 17th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Nodo *remove_rec(Nodo **arvore, char info){
  2.     Nodo *r;
  3.     if(*arvore == NULL)
  4.         return (Nodo *) 0x1;
  5.     else if((*arvore)->info == info)
  6.         return NULL;
  7.     else if(info > (*arvore)->info){
  8.         r = remove_rec(&(*arvore)->dir, info);
  9.         if(r == NULL){
  10.             r = (*arvore)->dir;
  11.             (*arvore)->dir = NULL;
  12.             return r;
  13.         }
  14.     }
  15.     else{
  16.         r = remove_rec(&(*arvore)->esq, info);
  17.         if(r == NULL){
  18.             r = (*arvore)->esq;
  19.             (*arvore)->esq = NULL;
  20.             return r;
  21.         }      
  22.     }
  23.     return (Nodo *) 0x1;
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top