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 ?
Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!
Overall Stats
Answers
34521 is right answer

Log in to add a comment
I agree with the answer is 54321

Log in to add a comment
Some one who have posted this answer has misguided us

Log in to add a comment
http://www.emis.de/journals/EJC/Volume_13/PDF/v13i1r68.pdf

Log in to add a comment
52314 is the correct ans. for using permutations rules

Log in to add a comment
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

Log in to add a comment
yup R8 54321

Log in to add a comment
i think there is something wrong

Log in to add a comment
how it can be?

Log in to add a comment
correct answer is 5,4,3,2,1 because stact is a LIFO device

Log in to add a comment
Shourya Singh Rawat from India is saying 5,4,3,1,2 is correct answer
Lets Know from Pakistan is saying 5,4,3,1,2 is correct answer
Baerov Bogdan from Mogosoaia, Romania is saying 3,4,5,1,2 is correct answer
Rohan Bhosale from Pune, India is saying 5,4,3,1,2 is correct answer
Mihir Shah from Majalgaon, India is saying 5,4,3,1,2 is correct answer
Related Questions
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
Given two sorted lists of size m and n respectively.The number of comparisons needed in the worst case by the merge sort algorithm will be?
 [A] mn
 [B] max(m,n)
 [C] min(m,n)
 [D] m+n1
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
An IP address is a numeric quantity that identifies 
 [A] a network adapter to other devices on the network
 [B] the manufacturer of a computer
 [C] the physical location of a computer
 [D] none of the above