Created
May 4, 2015 17:09
-
-
Save nathan-cruz77/ac6572151aed877c339d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PArv pesquisa(PArv arv, PArv* pai, int x){ | |
if(arv == NULL){ | |
return NULL; | |
} | |
else if(arv->chave == x){ | |
return arv; | |
} | |
else if(x < arv->chave){ | |
*pai = arv; | |
return pesquisa(arv->esq, pai, x); | |
} | |
else{ | |
*pai = arv; | |
return pesquisa(arv->dir, pai, x); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment