COMPLEJIDAD ELIMINA

private boolean elimina(T dato){//
        
NodoEneario<T> n,h,p,s; //4
        n = this.getPadre(dato);//O(n)
        if(n!=null){//2  
            h = n.getHijo();//2
            if(h.getHijo()!=null){//2 MAX
                s = h.getHijo();//O(1)+1
                n.setHijo(s);//O(1)+1
                p = s;//1
                while(s!=null){//1+E(1)
                    p = s;//1
                    s = s.getHermano();//O(1)+1
                }
                p.setHermano(h.getHermano()); //O(1)
            }else{
                n.setHijo(h.getHermano());//O(1)
            }           
            return (true);//1
        }
        n = this.getHermano(dato);//O(n)
        if(n!=null){//2
            h = n.getHermano();//O(1)+1
            if(h.getHijo()!=null){//O(1)+2 MAX
                s = h.getHijo();//O(1)+1
                n.setHermano(s);//O(1)
                p = s;//2
                while(s!=null){//1+E
                    p = s;//1
                    s = s.getHermano();//O(1)+1
                }
                p.setHermano(h.getHermano());//O(1)+1
            }else{
                n.setHermano(n.getHermano().getHermano());//O(1)
            }
            return (true);//1
        }

T(n)=4+n+2+2+2+max((2+2+2+1+1+Σ(1+2)+2),2)+1+n+2+2+2+max(2+2+2+1+Σ(1+2)+2,3)+1+n
T(n)=4+n+6+max((2+2+2+1+1+Σ(1+2)+2),2)+1+n+6+max(2+2+2+1+Σ(1+2)+2,3)+1+n
T(n)=4+n+14+Σ(1+2)+3+n+13+Σ(1+2)+3+n
T(n)=37+n+2(Σ(1+2))+n
T(n)=37+n+2(3n)+n
T(n)=37+8n
O(n)