Video solution will be uploaded soon.
The following sequence of operation is performed on stack: push(1), push(2), pop, push(1), push(2), pop, pop, pop, push(2), pop. The sequence of popped out values are: | Watch the step-by-step video solution for this NIMCET PYQ.