Data Structures | Stack | Question 4
Consider the following pseudocode that uses a stack
What is output for input “geeksquiz”?
Explanation: Since the stack data structure follows LIFO order. When we pop() items from stack, they are popped in reverse order of their insertion (or push())