doPushPopSymbol static method
Implementation
static String doPushPopSymbol(List<String> stack, String symbol, String currentCh) {
if (empty(stack)) {
stack.add(symbol);
} else {
if (top(stack, currentCh)) {
stack.removeLast();
} else {
stack.add(symbol);
}
}
return currentCh;
}