Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<class ARB>
- int ArbolBinario<ARB>::profundidadArbol(){
- if (arbolVacio()) {
- return 0;
- } else {
- if(puntPadre->izq->arbolVacio() && puntPadre->der->arbolVacio() {
- return 1;
- } else {
- return (1 + max (puntPadre->izq->profundidadArbol(), puntPadre->der->profundidadArbol())
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement