COMPLEJIDAD GETPESO(PRIVADO)

private int getPeso(NodoEneario<T> r){
       
        NodoEneario<T> q;//1
        int cant = 0;//2
        if(r!=null){//2
            cant++;//3
            q = r.getHijo();//O(1)+1
            if(q != null){//2
                cant+=getPeso(q);//t(1)
                q = q.getHermano();//O(1)+1
                while(q != null){//2+e()
                    cant+=getPeso(q);//t(1)
                    q = q.getHermano();//2
                }
            }
        }
        return (cant);//c1
       
    }

T(n)=1+2+2+3+2+2+2+t(1)+2+2+Σ(t(1)+2)+c1
T(n)=16+t(1)+Σ(t(1)+2)+c1
T(n)=16+t(1)+(nt(1))+2n+c1

T(n)=16+t(1)+(nt(1))+2n+c1 i=1
T(n)=32+2t(1)+2(nt(1))+4n+2c1 i=2
T(n)=96+3t(1)+3(nt(1))+12n+3c1 i=3

T(n)=k+kt(1)+k(nt(1))+kn+kc1 i=k
T(n)=n+nt(1)+n(nt(1))+nn+nc1 i=n
T(n)=nt(0)+n(nt(0))+3n+nc1 i=n
T(n)=n+n+3n+nc1
O(n)