Advertisement
ProToTN

Untitled

May 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. arbre inserer(arbre a, demande d)
  2. {
  3.     Tnoeud *nv;
  4.     if(a==NULL)
  5.     {
  6.  
  7.         nv=malloc(sizeof(Tnoeud));
  8.         nv->d=d;
  9.         nv->ABG=NULL;
  10.         nv->ABD=NULL;
  11.     }
  12.     else
  13.     {
  14.         if(d.code > a->d.code)
  15.             {
  16.                 a->ABD=inserer(a->ABD,d);
  17.             }
  18.         else
  19.             {
  20.                 a->ABG=inserer(a->ABG,d);
  21.             }
  22.             return(a);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement