Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Nodo<Tipo> *actual;
- bool encontro = false;
- bool izq = true, der = true;
- if (raiz == NULL)
- {
- cout << "El arbol esta vacio" << endl << endl;
- return false;
- }
- else
- {
- actual = raiz;
- while (actual != NULL && !encontro)
- {
- if (actual->informacion() == Padre)
- encontro = true;
- else
- {
- if (actual->informacion() > Padre)
- actual = actual->ligaizquierda();
- else
- actual = actual->ligaderecha();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement