7 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
Next Question

Overall Stats

Attempted 261
Correct 73
Incorrect 43
Viewed 145


Pkchandiya Brahman
Pkchandiya Brahman - 7 months ago

Pkchandiya Brahman from Larkana, Pakistan is saying 2,1,2,2,1 is correct answer

Cécile Musabyemariya
Cécile Musabyemariya - 9 months ago

Cécile Musabyemariya is saying 2,2,1,1,2 is correct answer

Lets Know
Lets Know - 4 years ago

Lets Know from Pakistan is saying 2,2,1,1,2 is correct answer

Rohan Bhosale
Rohan Bhosale - 4 years ago

Rohan Bhosale from Pune, India is saying 2,2,1,1,2 is correct answer

Mihir Shah
Mihir Shah - 4 years ago

Mihir Shah from Majalgaon, India is saying 2,2,1,1,2 is correct answer

Related Questions

Linked list are not suitable data structure of which one of the following problems ?

  • [A] Insertion sort
  • [B] Binary search
  • [C] Radix sort
  • [D] Polynomial manipulation

Merge sort uses ?

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