int tester(arbre a) { int res; int def; if(a==NULL) { res = 1; } else { if((a->droit==NULL) && (a->gauche==NULL)) { res = 1; } else { if(((a->gauche != NULL) && (a->val > a->gauche->val)) || ((a->droit != NULL) && (a->val > a->droit->val))) { def = 1; printf("Noeud deffectueux\n"); return 0; } else { if(a->gauche!=NULL) { tester(a->gauche); } if(a->droit!=NULL) { tester(a->droit); } } } } if(def==1) { return 0; } else { return 1; } }