public void eliminarDuplicados() {
        Nodo<T> q = p;
        Nodo<T> r;
        Nodo<T> s = q;
        boolean ban;
        while (q != null && s.getLiga() != null) {
            ban = false;
            r = q;
            s = q.getLiga();
            while (s.getValor() != q.getValor() && !ban) {
                if (s.getLiga() != null) {
                    r = s;
                    s = s.getLiga();
                } else {
                    ban = true;
                }
            }
            if (!ban) {
                if (s.getLiga() != null) {
                    s = s.getLiga();
                    r.setLiga(s);
                } else {
                    r.setLiga(null);
                }
            }
            q = q.getLiga();
        }
    }