COMPLEJIDAD GETALTURA(PRIVADO)

private int getAltura(NodoEneario<T> r){
        
        if(this.esHoja(r))//2
            return (1);//c1
        int maxAltura = 0;//2
        NodoEneario<T> q;//2
        if(r!=null){//2
            q = r.getHijo();//2            
            if(q != null){//2
                while(q != null){//2+E()
                    int auxAltura = getAltura(q);//T(1)
                    if(auxAltura>maxAltura)//2
                        maxAltura = auxAltura;//2
                    q = q.getHermano();//2
                }
            }
        }
        return (maxAltura+1);//C2
      
    }

T(n)=2+c1+2+2+2+2+Σ(T(1)+2+2+2)+c2
T(n)=10+c1+Σ(T(1)+2+2+2)+c2
T(n)=10+c1+n*T(1)+2n+2n+2n+c2
T(n)=10+c1+n*T(1)+6n+c2

T(n)=10+C1+C2+(n*T(1))+6n i=0
T(n)=10+C1+C2+(n*T(1))+6n i=1
T(n)=20+2C1+2C2+2(n*T(1))+12n i=2
T(n)=30+3C1+3C2+3(n*T(1))+36n i=3

T(n)=k+kC1+kC2+k(n*T(1))+kn i=k
T(n)=n+nC1+nC2+n(n*T(1))+nn i=n
T(n)=nC1+nC2+nT(1))+3n i=n
O(n)