COMPLEJIDAD GETALTURA

private int getAltura(NodoBin<T> r){//T=2+2+2+max(3,0)+2+max(3,0)+1+max(2,0)+2 = 6+3+2+3+1+2+2 = 19
        int ai=0, ad=0;                                                         //2+2
        if(r.getIzq()!=null)                                                    //2+max
            ai = getAltura(r.getIzq());                                      //3
        if(r.getDer()!=null)                                                    //2+max
            ad = getAltura(r.getDer());                                       //3
        if(ai>=ad)                                                              //1+max
            return (ai+1);                                                      //2
        return (ad+1);                                                          //2
    }
T=2+2+2+max(3,0)+2+max(3,0)+1+max(2,0)+2
T=6+3+2+3+1+2+2 = 19

T=19

O(1)