6 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 583
Correct 66
Incorrect 193
Viewed 324


Zunaira jafar - 1 year ago

34521 is right answer

teshale - 1 year ago

No answer because No sequence

shengqiushuang - 3 years ago

I agree with the answer is 54321

Nitesh Patel - 3 years ago

Some one who have posted this answer has misguided us

Suthar Bhanwar Mlm - 3 years ago


Suthar Bhanwar Mlm - 3 years ago

52314 is the correct ans. for using permutations rules

Lalit Kumar - 4 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 - 4 years ago

yup R8 54321

Ayush Rathi - 4 years ago

i think there is something wrong

Ayush Rathi - 4 years ago

how it can be?

Zaheer Abbas - 4 years ago

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

Utkarsh Mishra
Utkarsh Mishra - 3 months ago

Utkarsh Mishra is saying 3,4,5,2,1 is correct answer

Abdelrahman S. Fathy
Abdelrahman S. Fathy - 3 months ago

Abdelrahman S. Fathy from Cairo, Egypt is saying 3,4,5,2,1 is correct answer

Sakthi Lakshmanan An
Sakthi Lakshmanan An - 3 months ago

Sakthi Lakshmanan An is saying 5,4,3,1,2 is correct answer

E Xavier Emmanuel
E Xavier Emmanuel - 3 months ago

E Xavier Emmanuel is saying 1,5,2,3,4 is correct answer

abedalrahman shahrour
abedalrahman shahrour - 5 months ago

abedalrahman shahrour from Amman, Hashemite Kingdom Of Jordan is saying 1,5,2,3,4 is correct answer

Related Questions

Queue can be used to implement ?

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

Which of the following algorithm design technique is used in the quick sort algorithm?

  • [A] Dynamic programming
  • [B] Backtracking
  • [C] Divide and conquer
  • [D] Greedy method