Fixato un bug nella SinglePointerStack e aggiunto due programmi. StackCheckParenthesis che verifica la correttezza delle parentesi tonde e graffe in una stringa utilizzando lo stack. StackInverString che inverte una stringa usando lo stack

This commit is contained in:
2014-03-10 00:15:45 +01:00
parent 84aa1374c7
commit 2d07d22272
3 changed files with 110 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ public class SinglePointerStack<E> extends StackRules<E> {
}else{
to_return = stack;
stack = stack.getNext();
--number_of_elements;
return to_return.getElement();
}
}