string ONP

 0    7 flashcards    guest3979490
print play test yourself
 
Question - Answer -
deklaracja stosu
start learning
stack[char] stos;
ustalanie wartownika
start learning
stos. push('#');
deklaracja string
start learning
string onp="";
powtórz do końca w
start learning
for (int i=0; i<w. size(); i++)
sprawdź czy na stosie jest (
start learning
if(w[i]=='(')
dodaj do wyniku
start learning
onp=onp+stos. top();
sprawdź czy na stosie jest + lub -
start learning
if (w[i]=='+' || w[i]=='-')

You must sign in to write a comment