5 years ago in Data Structure

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 ?

[A] 2,2,1,1,2
[B] 2,2,1,2,2
[C] 2,1,2,2,1
[D] 2,1,2,2,2
Loading...
Next Question

Overall Stats

Attempted 369
Correct 102
Incorrect 77
Viewed 190

Answers

Guest
Guest
Serkie Mekonnen
Serkie Mekonnen - 6 days ago

Serkie Mekonnen from Dessie, Ethiopia is saying 2,1,2,2,1 is correct answer

Marem Husen
Marem Husen - 1 month ago

Marem Husen from Al Musayyib, Iraq is saying 2,1,2,2,1 is correct answer

deepak kumar
deepak kumar - 1 month ago

deepak kumar is saying 2,2,1,2,2 is correct answer

Uga Balu
Uga Balu - 1 month ago

Uga Balu from Chennai, India is saying 2,2,1,1,2 is correct answer

uma
uma - 1 month ago

uma from Hindupur, India is saying 2,2,1,1,2 is correct answer

Related Questions

Queue can be used to implement ?

  • [A] quick sort
  • [B] merge sort
  • [C] heap sort
  • [D] insertion sort

Merge sort uses ?

  • [A] Divide and conquer strategy
  • [B] Backtracking approach
  • [C] Heuristic search
  • [D] Greedy approach