7 years ago in Data Structure

Which one of the following permutations can be obtained the output using stack assuming that the input is the sequence 1,2,3,4,5 in that order ?

[A] 3,4,5,1,2
[B] 3,4,5,2,1
[C] 1,5,2,3,4
[D] 5,4,3,1,2
Next Question

Overall Stats

Attempted 326
Correct 34
Incorrect 115
Viewed 177


Zunaira jafar - 2 years ago

34521 is right answer

teshale - 2 years ago

No answer because No sequence

shengqiushuang - 5 years ago

I agree with the answer is 54321

Nitesh Patel - 5 years ago

Some one who have posted this answer has misguided us

Suthar Bhanwar Mlm - 5 years ago


Suthar Bhanwar Mlm - 5 years ago

52314 is the correct ans. for using permutations rules

Lalit Kumar - 5 years ago

this is correct answer first push 5,4,3 in the stack and then pop them ns we get 3,4,5 and then push 2,1 and we get 1,2 so answer is 3,4,5,1,2

Ajaysing Rajput - 5 years ago

yup R8 54321

Ayush Rathi - 6 years ago

i think there is something wrong

Ayush Rathi - 6 years ago

how it can be?

Zaheer Abbas - 6 years ago

correct answer is 5,4,3,2,1 because stact is a LIFO device

khushi singh
khushi singh - 3 months ago

khushi singh is saying 3,4,5,1,2 is correct answer

Govind nama
Govind nama - 6 months ago

Govind nama is saying 3,4,5,2,1 is correct answer

Palgutta Vamshidhar Reddy
Palgutta Vamshidhar Reddy - 6 months ago

Palgutta Vamshidhar Reddy is saying 3,4,5,2,1 is correct answer

Pkchandiya Brahman
Pkchandiya Brahman - 7 months ago

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

Shourya Singh Rawat
Shourya Singh Rawat - 4 years ago

Shourya Singh Rawat from India is saying 5,4,3,1,2 is correct answer

Related Questions

A vertex of degree one is called

  • [A] padent
  • [B] isolated vertex
  • [C] null vertex
  • [D] colored vertex

Sparse matrices have ?

  • [A] no zero
  • [B] many zero
  • [C] higher dimenstion
  • [D] none

Merge sort uses ?

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