Consider a stack S given below with elements 1,2,3 along with the usual operations push(), pop() and top() as shown.
The number of elements that will remain in the stack after the parsing of the input string according to the above SDT rules is _______
I think the answer should be 5 but 4 is provided as answer.
here element 4 is not pushed into the stack.
am I right?