The Gateway to Computer Science Excellence
0 votes
18 views

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?

  1. 2,1,2,2,1
  2. 2,1,2,2,2
  3. 2,2,1,1,2
  4. 2,2,1,2,2
in Programming by Veteran (74.6k points) | 18 views

Please log in or register to answer this question.

Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,339 answers
198,449 comments
105,205 users