COMPLEJIDAD BUSCAR(PRIVADO)

private NodoEneario<T> buscar(NodoEneario<T> r, T dato){
       
       NodoEneario<T> q, s; //2
       if(r==null)//2
           return (r);//C1
       if(r.getInfo().equals(dato))//3
           return (r);//C2
           q = r.getHijo();//2
       while(q != null){//2+E()
           s = buscar(q, dato);//T(1) 
           if(s != null){//2
               return (s);//C3
           }
           q = q.getHermano();//2
       }
       return (null);//C4
    } 

T(n)=2+2+C1+3+C2+2+2+Σ(T(1)+2+3)+2+C4
T(n)=1+C1+C2+Σ(T(1)+5)+2+C4
T(n)=1+C1+C2+(n*T(1))+5n+2+C4

T(n)=C1+C2+(n*T(1))+5n+C4 i=0
T(n)=1+C1+C2+(n*T(1))+5n+C4 i=1
T(n)=2+2C1+2C2+2(n*T(1))+10n+3C4 i=2
T(n)=3+3C1+3C2+3(n*T(1))+30n+3C4 i=3

T(n)=k+kC1+kC2+k(n*T(1))+kn+kC4 i=k
T(n)=n+nC1+nC2+n(n*T(1))+n+n+nC4 i=n
T(n)=nC1+nC2+n+3n+nC4 i=n
0(n)