public static Double resolver(ColaLigada<String> posfija) throws Exception{
         
         Double a=0.0;
         Double b=0.0;
         Double c=0.0;
         PilaLigada<Double> pila= new PilaLigada<>();
         while(!posfija.vacia()){
             String simbolo=posfija.pop();
           switch (simbolo) {
                case "^":
                    b=pila.pop();
                    a=pila.pop();
                    pila.push(Math.pow(a, b));
                    break;
                case "*":
                    b=pila.pop();
                    a=pila.pop();
                    pila.push(a*b);
                    break;
                case "/":
                    b=pila.pop();
                    a=pila.pop();
                    pila.push(a/b);
                    break;
                case "+":
                   b=pila.pop();
                    a=pila.pop();
                    pila.push(a+b);
                    break;
                case "-":
                    b=pila.pop();
                    a=pila.pop();
                    pila.push(a-b);
                    break;
                default:
                    pila.push(Double.parseDouble(simbolo));
                    break;

            }
         }
         return pila.pop();
     }